From 166c4b5eeda39f8d4e57fe18779d676bbe395829 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 23 Jan 2024 10:22:21 -0500 Subject: [PATCH 01/45] Union pointers to save space in `CommandSender` (#31609) * Union pointers to save space in CommandSender * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/app/CommandSender.cpp | 18 ++++----------- src/app/CommandSender.h | 48 +++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 6ab19b2ebd2276..1066ca92825891 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -63,7 +63,7 @@ CHIP_ERROR GetRef(ParserT aParser, Optional & aRef, bool commandRefExp CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest, bool aSuppressResponse) : mExchangeCtx(*this), - mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(aSuppressResponse), mTimedRequest(aIsTimedRequest) + mCallbackHandle(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(aSuppressResponse), mTimedRequest(aIsTimedRequest) { assertChipStackLockedByCurrentThread(); } @@ -71,8 +71,8 @@ CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * CommandSender::CommandSender(ExtendableCallback * apExtendableCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest, bool aSuppressResponse) : mExchangeCtx(*this), - mpExtendableCallback(apExtendableCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(aSuppressResponse), - mTimedRequest(aIsTimedRequest) + mCallbackHandle(apExtendableCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(aSuppressResponse), + mTimedRequest(aIsTimedRequest), mUseExtendableCallback(true) { assertChipStackLockedByCurrentThread(); } @@ -86,12 +86,6 @@ CHIP_ERROR CommandSender::AllocateBuffer() { if (!mBufferAllocated) { - // We are making sure that both callbacks are not set. This should never happen as the constructors - // are strongly typed and only one should ever be set, but explicit check is here to ensure that is - // always the case. - bool bothCallbacksAreSet = mpExtendableCallback != nullptr && mpCallback != nullptr; - VerifyOrDie(!bothCallbacksAreSet); - mCommandMessageWriter.Reset(); System::PacketBufferHandle commandPacket = System::PacketBufferHandle::New(chip::app::kMaxSecureSduLengthBytes); @@ -417,8 +411,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponseIB(InvokeResponseIB::Parser & aIn // When using ExtendableCallbacks, we are adhering to a different API contract where path // specific errors are sent to the OnResponse callback. For more information on the history // of this issue please see https://github.com/project-chip/connectedhomeip/issues/30991 - bool usingExtendableCallbacks = mpExtendableCallback != nullptr; - if (statusIB.IsSuccess() || usingExtendableCallbacks) + if (statusIB.IsSuccess() || mUseExtendableCallback) { const ConcreteCommandPath concretePath = ConcreteCommandPath(endpointId, clusterId, commandId); ResponseData responseData = { concretePath, statusIB }; @@ -456,8 +449,7 @@ CHIP_ERROR CommandSender::PrepareCommand(const CommandPathParams & aCommandPathP // // We must not be in the middle of preparing a command, and must not have already sent InvokeRequestMessage. // - bool usingExtendableCallbacks = mpExtendableCallback != nullptr; - bool canAddAnotherCommand = (mState == State::AddedCommand && mBatchCommandsEnabled && usingExtendableCallbacks); + bool canAddAnotherCommand = (mState == State::AddedCommand && mBatchCommandsEnabled && mUseExtendableCallback); VerifyOrReturnError(mState == State::Idle || canAddAnotherCommand, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mFinishedCommandCount < mRemoteMaxPathsPerInvoke, CHIP_ERROR_MAXIMUM_PATHS_PER_INVOKE_EXCEEDED); diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index dfcd3e1a62a5f0..41ec5befe3e40a 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -455,7 +455,7 @@ class CommandSender final : public Messaging::ExchangeDelegate private: friend class TestCommandInteraction; - enum class State + enum class State : uint8_t { Idle, ///< Default state that the object starts out in, where no work has commenced AddingCommand, ///< In the process of adding a command. @@ -466,6 +466,14 @@ class CommandSender final : public Messaging::ExchangeDelegate AwaitingDestruction, ///< The object has completed its work and is awaiting destruction by the application. }; + union CallbackHandle + { + CallbackHandle(Callback * apCallback) : legacyCallback(apCallback) {} + CallbackHandle(ExtendableCallback * apExtendableCallback) : extendableCallback(apExtendableCallback) {} + Callback * legacyCallback; + ExtendableCallback * extendableCallback; + }; + void MoveToState(const State aTargetState); const char * GetStateStr() const; @@ -513,46 +521,45 @@ class CommandSender final : public Messaging::ExchangeDelegate void OnResponseCallback(const ResponseData & aResponseData) { // mpExtendableCallback and mpCallback are mutually exclusive. - if (mpExtendableCallback) + if (mUseExtendableCallback && mCallbackHandle.extendableCallback) { - mpExtendableCallback->OnResponse(this, aResponseData); + mCallbackHandle.extendableCallback->OnResponse(this, aResponseData); } - else if (mpCallback) + else if (mCallbackHandle.legacyCallback) { - mpCallback->OnResponse(this, aResponseData.path, aResponseData.statusIB, aResponseData.data); + mCallbackHandle.legacyCallback->OnResponse(this, aResponseData.path, aResponseData.statusIB, aResponseData.data); } } void OnErrorCallback(CHIP_ERROR aError) { // mpExtendableCallback and mpCallback are mutually exclusive. - if (mpExtendableCallback) + if (mUseExtendableCallback && mCallbackHandle.extendableCallback) { ErrorData errorData = { aError }; - mpExtendableCallback->OnError(this, errorData); + mCallbackHandle.extendableCallback->OnError(this, errorData); } - else if (mpCallback) + else if (mCallbackHandle.legacyCallback) { - mpCallback->OnError(this, aError); + mCallbackHandle.legacyCallback->OnError(this, aError); } } void OnDoneCallback() { // mpExtendableCallback and mpCallback are mutually exclusive. - if (mpExtendableCallback) + if (mUseExtendableCallback && mCallbackHandle.extendableCallback) { - mpExtendableCallback->OnDone(this); + mCallbackHandle.extendableCallback->OnDone(this); } - else if (mpCallback) + else if (mCallbackHandle.legacyCallback) { - mpCallback->OnDone(this); + mCallbackHandle.legacyCallback->OnDone(this); } } Messaging::ExchangeHolder mExchangeCtx; - Callback * mpCallback = nullptr; - ExtendableCallback * mpExtendableCallback = nullptr; + CallbackHandle mCallbackHandle; Messaging::ExchangeManager * mpExchangeMgr = nullptr; InvokeRequestMessage::Builder mInvokeRequestBuilder; // TODO Maybe we should change PacketBufferTLVWriter so we can finalize it @@ -564,15 +571,16 @@ class CommandSender final : public Messaging::ExchangeDelegate Optional mTimedInvokeTimeoutMs; TLV::TLVType mDataElementContainerType = TLV::kTLVType_NotSpecified; - State mState = State::Idle; chip::System::PacketBufferTLVWriter mCommandMessageWriter; uint16_t mFinishedCommandCount = 0; uint16_t mRemoteMaxPathsPerInvoke = 1; - bool mSuppressResponse = false; - bool mTimedRequest = false; - bool mBufferAllocated = false; - bool mBatchCommandsEnabled = false; + State mState = State::Idle; + bool mSuppressResponse = false; + bool mTimedRequest = false; + bool mBufferAllocated = false; + bool mBatchCommandsEnabled = false; + bool mUseExtendableCallback = false; }; } // namespace app From 84117dda0b6f2f3f546bd49f1a1ee48acddf014c Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 23 Jan 2024 12:47:44 -0500 Subject: [PATCH 02/45] Move `CommandSender::Callback` into CommandSenderLegacyCallback.h (#31370) --------- Co-authored-by: Boris Zbarsky --- src/app/CommandSender.h | 77 ++------------------ src/app/CommandSenderLegacyCallback.h | 101 ++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 71 deletions(-) create mode 100644 src/app/CommandSenderLegacyCallback.h diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 41ec5befe3e40a..76374416886e9b 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -26,6 +26,8 @@ #include +#include "CommandSenderLegacyCallback.h" + #include #include #include @@ -53,77 +55,6 @@ namespace app { class CommandSender final : public Messaging::ExchangeDelegate { public: - // TODO(#30453) Reorder CommandSender::Callback and CommandSender::ExtendableCallback. To keep follow up - // review simple, this was not done initially, and is expected to be completed within day of PR - // introducing CommandSender::ExtendableCallback getting merged. - /** - * @brief Legacy callbacks for CommandSender - */ - class Callback - { - public: - virtual ~Callback() = default; - - /** - * OnResponse will be called when a successful response from server has been received and processed. - * Specifically: - * - When a status code is received and it is IM::Success, aData will be nullptr. - * - When a data response is received, aData will point to a valid TLVReader initialized to point at the struct container - * that contains the data payload (callee will still need to open and process the container). - * - * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it - * receives an OnDone call to destroy the object. - * - * @param[in] apCommandSender The command sender object that initiated the command transaction. - * @param[in] aPath The command path field in invoke command response. - * @param[in] aStatusIB It will always have a success status. If apData is null, it can be any success status, - * including possibly a cluster-specific one. If apData is not null it aStatusIB will always - * be a generic SUCCESS status with no-cluster specific information. - * @param[in] apData The command data, will be nullptr if the server returns a StatusIB. - */ - virtual void OnResponse(CommandSender * apCommandSender, const ConcreteCommandPath & aPath, const StatusIB & aStatusIB, - TLV::TLVReader * apData) - {} - - /** - * OnError will be called when an error occurs *after* a successful call to SendCommandRequest(). The following - * errors will be delivered through this call in the aError field: - * - * - CHIP_ERROR_TIMEOUT: A response was not received within the expected response timeout. - * - CHIP_ERROR_*TLV*: A malformed, non-compliant response was received from the server. - * - CHIP_ERROR encapsulating a StatusIB: If we got a non-path-specific or path-specific - * status response from the server. In that case, - * StatusIB::InitFromChipError can be used to extract the status. - * - Note: a CommandSender using `CommandSender::Callback` only supports sending - * a single InvokeRequest. As a result, only one path-specific error is expected - * to ever be sent to the OnError callback. - * - CHIP_ERROR*: All other cases. - * - * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it - * receives an OnDone call to destroy and free the object. - * - * @param[in] apCommandSender The command sender object that initiated the command transaction. - * @param[in] aError A system error code that conveys the overall error code. - */ - virtual void OnError(const CommandSender * apCommandSender, CHIP_ERROR aError) {} - - /** - * OnDone will be called when CommandSender has finished all work and it is safe to destroy and free the - * allocated CommandSender object. - * - * This function will: - * - Always be called exactly *once* for a given CommandSender instance. - * - Be called even in error circumstances. - * - Only be called after a successful call to SendCommandRequest returns, if SendCommandRequest is used. - * - Always be called before a successful return from SendGroupCommandRequest, if SendGroupCommandRequest is used. - * - * This function must be implemented to destroy the CommandSender object. - * - * @param[in] apCommandSender The command sender object of the terminated invoke command transaction. - */ - virtual void OnDone(CommandSender * apCommandSender) = 0; - }; - // CommandSender::ExtendableCallback::OnResponse is public SDK API, so we cannot break // source compatibility for it. To allow for additional values to be added at a future // time without constantly changing the function's declaration parameter list, we are @@ -229,6 +160,10 @@ class CommandSender final : public Messaging::ExchangeDelegate virtual void OnDone(CommandSender * apCommandSender) = 0; }; + // `Callback` exists for legacy purposes. If you are developing a new callback implementation, + // please use `ExtendableCallback`. + using Callback = CommandSenderLegacyCallback; + // SetCommandSenderConfig is a public SDK API, so we cannot break source compatibility // for it. By having parameters to that API use this struct instead of individual // function arguments, we centralize required changes to one file when adding new diff --git a/src/app/CommandSenderLegacyCallback.h b/src/app/CommandSenderLegacyCallback.h new file mode 100644 index 00000000000000..f6c63c1fd96292 --- /dev/null +++ b/src/app/CommandSenderLegacyCallback.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +class CommandSender; + +/** + * @brief Legacy callbacks for CommandSender + * + * This class exists for legacy purposes. If you are developing a new callback implementation, + * please use `CommandSender::ExtendableCallback`. + */ +class CommandSenderLegacyCallback +{ +public: + virtual ~CommandSenderLegacyCallback() = default; + + /** + * OnResponse will be called when a successful response from server has been received and processed. + * Specifically: + * - When a status code is received and it is IM::Success, aData will be nullptr. + * - When a data response is received, aData will point to a valid TLVReader initialized to point at the struct container + * that contains the data payload (callee will still need to open and process the container). + * + * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it + * receives an OnDone call to destroy the object. + * + * @param[in] apCommandSender The command sender object that initiated the command transaction. + * @param[in] aPath The command path field in invoke command response. + * @param[in] aStatusIB It will always have a success status. If apData is null, it can be any success status, + * including possibly a cluster-specific one. If apData is not null it aStatusIB will always + * be a generic SUCCESS status with no-cluster specific information. + * @param[in] apData The command data, will be nullptr if the server returns a StatusIB. + */ + virtual void OnResponse(CommandSender * apCommandSender, const ConcreteCommandPath & aPath, const StatusIB & aStatusIB, + TLV::TLVReader * apData) + {} + + /** + * OnError will be called when an error occurs *after* a successful call to SendCommandRequest(). The following + * errors will be delivered through this call in the aError field: + * + * - CHIP_ERROR_TIMEOUT: A response was not received within the expected response timeout. + * - CHIP_ERROR_*TLV*: A malformed, non-compliant response was received from the server. + * - CHIP_ERROR encapsulating a StatusIB: If we got a non-path-specific or path-specific + * status response from the server. In that case, + * StatusIB::InitFromChipError can be used to extract the status. + * - Note: a CommandSender using `CommandSender::Callback` only supports sending + * a single InvokeRequest. As a result, only one path-specific error is expected + * to ever be sent to the OnError callback. + * - CHIP_ERROR*: All other cases. + * + * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it + * receives an OnDone call to destroy and free the object. + * + * @param[in] apCommandSender The command sender object that initiated the command transaction. + * @param[in] aError A system error code that conveys the overall error code. + */ + virtual void OnError(const CommandSender * apCommandSender, CHIP_ERROR aError) {} + + /** + * OnDone will be called when CommandSender has finished all work and it is safe to destroy and free the + * allocated CommandSender object. + * + * This function will: + * - Always be called exactly *once* for a given CommandSender instance. + * - Be called even in error circumstances. + * - Only be called after a successful call to SendCommandRequest returns, if SendCommandRequest is used. + * - Always be called before a successful return from SendGroupCommandRequest, if SendGroupCommandRequest is used. + * + * This function must be implemented to destroy the CommandSender object. + * + * @param[in] apCommandSender The command sender object of the terminated invoke command transaction. + */ + virtual void OnDone(CommandSender * apCommandSender) = 0; +}; + +} // namespace app +} // namespace chip From 9f1c15990db0d70e218fbf825f11269239323e8a Mon Sep 17 00:00:00 2001 From: Michael Rupp <95718139+mykrupp@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:19:35 -0500 Subject: [PATCH 03/45] Allow sample apps to override BaseApplication's default lcd screen (#31603) * Allow sample apps to override BaseApplication's default lcd screen * Restyled by whitespace * use virtual method in parent class --------- Co-authored-by: Restyled.io --- examples/platform/silabs/BaseApplication.cpp | 15 ++++++++++----- examples/platform/silabs/BaseApplication.h | 5 +++++ examples/platform/silabs/display/lcd.h | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index fadeaf954912e5..99acb26d9bd26e 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -458,11 +458,7 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) // - Cycle LCD screen CancelFunctionTimer(); - OutputQrCode(false); -#ifdef DISPLAY_ENABLED - UpdateLCDStatusScreen(); - slLCD.CycleScreens(); -#endif + AppTask::GetAppTask().UpdateDisplay(); #ifdef SL_WIFI if (!ConnectivityMgr().IsWiFiStationProvisioned()) @@ -493,6 +489,15 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) } } +void BaseApplication::UpdateDisplay() +{ + OutputQrCode(false); +#ifdef DISPLAY_ENABLED + UpdateLCDStatusScreen(); + slLCD.CycleScreens(); +#endif +} + void BaseApplication::CancelFunctionTimer() { if (xTimerStop(sFunctionTimer, pdMS_TO_TICKS(0)) == pdFAIL) diff --git a/examples/platform/silabs/BaseApplication.h b/examples/platform/silabs/BaseApplication.h index 0bde0e76f227a2..b38f0e58e1c305 100644 --- a/examples/platform/silabs/BaseApplication.h +++ b/examples/platform/silabs/BaseApplication.h @@ -105,6 +105,11 @@ class BaseApplication */ static void PostEvent(const AppEvent * event); + /** + * @brief Overridable function used to update display on button press + */ + virtual void UpdateDisplay(); + #ifdef DISPLAY_ENABLED /** * @brief Return LCD object diff --git a/examples/platform/silabs/display/lcd.h b/examples/platform/silabs/display/lcd.h index b6f3fc9a0669fc..703e72ab6ea61f 100644 --- a/examples/platform/silabs/display/lcd.h +++ b/examples/platform/silabs/display/lcd.h @@ -71,6 +71,7 @@ class SilabsLCD void SetScreen(Screen_e screen); void CycleScreens(void); void SetStatus(DisplayStatus_t & status); + void WriteStatus(); #ifdef QR_CODE_ENABLED void SetQRCode(uint8_t * str, uint32_t size); @@ -85,7 +86,6 @@ class SilabsLCD } DemoState_t; void WriteDemoUI(); - void WriteStatus(); #ifdef QR_CODE_ENABLED void WriteQRCode(); From af6ce62d35d856b8d908e2220bd40a9b197aad27 Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:32:58 -0300 Subject: [PATCH 04/45] Fix some python script files methods name in order to follow expected template (#31630) * Fix test case misspelling * Fixed test case methods name in order to follow the expected template --- src/python_testing/TC_DGGEN_2_4.py | 2 +- src/python_testing/TC_DeviceBasicComposition.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/python_testing/TC_DGGEN_2_4.py b/src/python_testing/TC_DGGEN_2_4.py index 4199db94c4ebd3..ed5ffc8c05d425 100644 --- a/src/python_testing/TC_DGGEN_2_4.py +++ b/src/python_testing/TC_DGGEN_2_4.py @@ -65,7 +65,7 @@ async def send_time_snapshot_expect_success(self): return response @async_test_body - async def test_TC_GEN_2_4(self): + async def test_TC_DGGEN_2_4(self): self.print_step("1a", "Detect Time Synchronization UTCTime attribute presence") root_descriptor = await self.default_controller.ReadAttribute(self.dut_node_id, [(0, Clusters.Descriptor)]) root_server_list = root_descriptor[0][Clusters.Descriptor][Clusters.Descriptor.Attributes.ServerList] diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 30a4353f7ffe88..446907fe585dbc 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -150,7 +150,7 @@ def test_TC_SM_1_1(self): problem=f'Root node does not contain required cluster {c}', spec_location="Root node device type") self.fail_current_test() - def test_DT_1_1(self): + def test_TC_DT_1_1(self): self.print_step(1, "Perform a wildcard read of attributes on all endpoints - already done") self.print_step(2, "Verify that each endpoint includes a descriptor cluster") success = True @@ -165,7 +165,7 @@ def test_DT_1_1(self): if not success: self.fail_current_test("At least one endpoint was missing the descriptor cluster.") - def test_IDM_10_1(self): + def test_TC_IDM_10_1(self): self.print_step(1, "Perform a wildcard read of attributes on all endpoints - already done") @dataclass @@ -464,7 +464,7 @@ class RequiredMandatoryAttribute: self.fail_current_test( "At least one cluster has failed the range and support checks for its listed attributes, commands or features") - def test_IDM_11_1(self): + def test_TC_IDM_11_1(self): success = True for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): @@ -671,7 +671,7 @@ def GetPartValidityProblem(endpoint): if not success: self.fail_current_test("power source EndpointList attribute is incorrect") - def test_DESC_2_2(self): + def test_TC_DESC_2_2(self): self.print_step(0, "Wildcard read of device - already done") self.print_step( From e4ae859633389af63549b3063e832401cd11adf0 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 23 Jan 2024 17:06:12 -0500 Subject: [PATCH 05/45] Fix comment in CommandResponseSender::OnMessageReceived (#31610) --- src/app/CommandResponseSender.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/CommandResponseSender.cpp b/src/app/CommandResponseSender.cpp index 6e69cd45a9538f..5b322c72ce9d06 100644 --- a/src/app/CommandResponseSender.cpp +++ b/src/app/CommandResponseSender.cpp @@ -39,9 +39,10 @@ CHIP_ERROR CommandResponseSender::OnMessageReceived(Messaging::ExchangeContext * VerifyOrExit(err == CHIP_NO_ERROR, failureStatusToSend.SetValue(Status::InvalidAction)); // If SendCommandResponse() fails, we are responsible for closing the exchange, - // as stipulated by the API contract. We fulfill this obligation by setting - // `failureStatusToSend` to a value that triggers the transmission of a final - // StatusResponse, which does not expect a response. + // as stipulated by the API contract. We fulfill this obligation by not sending + // a message expecting a response on the exchange. Since we are in the middle + // of processing an incoming message, the exchange will close itself once we are + // done processing it, if there is no response to wait for at that point. err = SendCommandResponse(); VerifyOrExit(err == CHIP_NO_ERROR, failureStatusToSend.SetValue(Status::Failure)); From 57ba06a25c43fdf8e41adccc08b5b2b46e97c8e1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 23 Jan 2024 17:27:21 -0500 Subject: [PATCH 06/45] Update Darwin availability annotations. (#31634) Explicitly list EnergyEVSEMode and DeviceEnergyManagementMode as provisional. --- src/darwin/Framework/CHIP/templates/availability.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index e1f129f9d0e763..4850889f6ce132 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8544,6 +8544,10 @@ - release: "Future" versions: "future" provisional: + clusters: + # Targeting Spring 2024 Matter release + - EnergyEVSEMode + - DeviceEnergyManagementMode attributes: DoorLock: # Aliro is not ready yet. From 05152259733aa4f11ad6d0e92e10b0fdf381f407 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Tue, 23 Jan 2024 18:48:54 -0500 Subject: [PATCH 07/45] Add MEI element support to Unit Testing cluster (#31637) * Update XML file * Regen ZAP * Update cluster code * Add test and cluster updates * Regen tests * Restyled by clang-format * Restyled by prettier-yaml * Update XML * Regen ZAP * Update test * Updated Unit Test cluster code --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io --- .../all-clusters-app.matter | 20 + .../all-clusters-common/all-clusters-app.zap | 39 + .../all-clusters-minimal-app.matter | 23 + .../all-clusters-minimal-app.zap | 71 + .../test-cluster-server.cpp | 22 + src/app/tests/suites/TestCluster.yaml | 37 +- .../suites/TestUnitTestingClusterMei.yaml | 103 + .../zcl/data-model/chip/test-cluster.xml | 27 +- .../data_model/controller-clusters.matter | 16 + .../chip/devicecontroller/ChipClusters.java | 76 + .../devicecontroller/ChipEventStructs.java | 46 + .../devicecontroller/ClusterIDMapping.java | 24 +- .../devicecontroller/ClusterInfoMapping.java | 42 + .../devicecontroller/ClusterReadMapping.java | 11 + .../devicecontroller/ClusterWriteMapping.java | 22 + ...ClusterTestDifferentVendorMeiEventEvent.kt | 55 + .../chip/devicecontroller/cluster/files.gni | 1 + .../cluster/clusters/UnitTestingCluster.kt | 181 ++ ...ClusterTestDifferentVendorMeiEventEvent.kt | 55 + .../java/matter/controller/cluster/files.gni | 1 + .../CHIPAttributeTLVValueDecoder.cpp | 16 + .../zap-generated/CHIPClustersWrite-JNI.cpp | 52 + .../CHIPEventTLVValueDecoder.cpp | 38 + .../zap-generated/CHIPInvokeCallbacks.cpp | 67 + .../java/zap-generated/CHIPInvokeCallbacks.h | 15 + .../python/chip/clusters/CHIPClusters.py | 14 + .../python/chip/clusters/Objects.py | 71 + .../MTRAttributeSpecifiedCheck.mm | 3 + .../MTRAttributeTLVValueDecoder.mm | 11 + .../CHIP/zap-generated/MTRBaseClusters.h | 14 + .../CHIP/zap-generated/MTRBaseClusters.mm | 88 + .../CHIP/zap-generated/MTRClusterConstants.h | 4 + .../CHIP/zap-generated/MTRClusters.h | 5 + .../CHIP/zap-generated/MTRClusters.mm | 43 + .../zap-generated/MTRCommandPayloadsObjc.h | 51 + .../zap-generated/MTRCommandPayloadsObjc.mm | 164 ++ .../MTRCommandPayloads_Internal.h | 12 + .../zap-generated/MTREventTLVValueDecoder.mm | 17 + .../CHIP/zap-generated/MTRStructsObjc.h | 5 + .../CHIP/zap-generated/MTRStructsObjc.mm | 27 + .../zap-generated/attributes/Accessors.cpp | 31 + .../zap-generated/attributes/Accessors.h | 5 + .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-objects.cpp | 110 + .../zap-generated/cluster-objects.h | 123 + .../app-common/zap-generated/ids/Attributes.h | 4 + .../app-common/zap-generated/ids/Commands.h | 8 + .../app-common/zap-generated/ids/Events.h | 4 + .../zap-generated/cluster/Commands.h | 58 +- .../cluster/logging/DataModelLogger.cpp | 40 + .../cluster/logging/DataModelLogger.h | 4 + .../zap-generated/cluster/Commands.h | 196 ++ .../zap-generated/test/Commands.h | 2227 +++++++++-------- 53 files changed, 3349 insertions(+), 1056 deletions(-) create mode 100644 src/app/tests/suites/TestUnitTestingClusterMei.yaml create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index c273dbbda6ad59..0b097380222275 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -6616,6 +6616,10 @@ internal cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + info event TestDifferentVendorMeiEvent = 4294050030 { + int8u arg1 = 1; + } + attribute boolean boolean = 0; attribute Bitmap8MaskMap bitmap8 = 1; attribute Bitmap16MaskMap bitmap16 = 2; @@ -6698,6 +6702,7 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6893,6 +6898,15 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } + request struct TestDifferentVendorMeiRequestRequest { + int8u arg1 = 0; + } + + response struct TestDifferentVendorMeiResponse = 4294049979 { + int8u arg1 = 0; + int64u eventNumber = 1; + } + /** Simple command without any parameters and without a specific response. To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; @@ -6963,6 +6977,8 @@ internal cluster UnitTesting = 4294048773 { command TestBatchHelperRequest(TestBatchHelperRequestRequest): TestBatchHelperResponse = 22; /** Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. */ command TestSecondBatchHelperRequest(TestSecondBatchHelperRequestRequest): TestBatchHelperResponse = 23; + /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ + command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } /** The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). */ @@ -8710,6 +8726,7 @@ endpoint 1 { server cluster UnitTesting { emits event TestEvent; emits event TestFabricScopedEvent; + emits event TestDifferentVendorMeiEvent; ram attribute boolean default = false; ram attribute bitmap8 default = 0; ram attribute bitmap16 default = 0; @@ -8793,6 +8810,7 @@ endpoint 1 { callback attribute writeOnlyInt8u default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + ram attribute meiInt8u default = 0; handle command Test; handle command TestSpecificResponse; @@ -8822,6 +8840,8 @@ endpoint 1 { handle command TestEmitTestFabricScopedEventRequest; handle command TestBatchHelperRequest; handle command TestSecondBatchHelperRequest; + handle command TestDifferentVendorMeiRequest; + handle command TestDifferentVendorMeiResponse; } } endpoint 2 { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 47ecf27106eff5..c9c353ddea89ca 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -21209,6 +21209,22 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "TestDifferentVendorMeiRequest", + "code": 4294049962, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TestDifferentVendorMeiResponse", + "code": 4294049979, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -22508,6 +22524,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "MeiInt8u", + "code": 4294070017, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -22555,6 +22587,13 @@ "mfgCode": null, "side": "server", "included": 1 + }, + { + "name": "TestDifferentVendorMeiEvent", + "code": 4294050030, + "mfgCode": null, + "side": "server", + "included": 1 } ] } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 9e91b81b29fa93..5c337c947f5b16 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -5491,6 +5491,10 @@ internal cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + info event TestDifferentVendorMeiEvent = 4294050030 { + int8u arg1 = 1; + } + attribute boolean boolean = 0; attribute Bitmap8MaskMap bitmap8 = 1; attribute Bitmap16MaskMap bitmap16 = 2; @@ -5573,6 +5577,7 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5768,6 +5773,15 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } + request struct TestDifferentVendorMeiRequestRequest { + int8u arg1 = 0; + } + + response struct TestDifferentVendorMeiResponse = 4294049979 { + int8u arg1 = 0; + int64u eventNumber = 1; + } + /** Simple command without any parameters and without a specific response. To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; @@ -5838,6 +5852,8 @@ internal cluster UnitTesting = 4294048773 { command TestBatchHelperRequest(TestBatchHelperRequestRequest): TestBatchHelperResponse = 22; /** Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. */ command TestSecondBatchHelperRequest(TestSecondBatchHelperRequestRequest): TestBatchHelperResponse = 23; + /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ + command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } endpoint 0 { @@ -6646,6 +6662,7 @@ endpoint 1 { server cluster UnitTesting { emits event TestEvent; emits event TestFabricScopedEvent; + emits event TestDifferentVendorMeiEvent; ram attribute boolean default = false; ram attribute bitmap8 default = 0; ram attribute bitmap16 default = 0; @@ -6726,8 +6743,10 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt8s default = -20; ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; + callback attribute writeOnlyInt8u default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + ram attribute meiInt8u default = 0; handle command Test; handle command TestSpecificResponse; @@ -6755,6 +6774,10 @@ endpoint 1 { handle command TestSimpleOptionalArgumentRequest; handle command TestEmitTestEventRequest; handle command TestEmitTestFabricScopedEventRequest; + handle command TestBatchHelperRequest; + handle command TestSecondBatchHelperRequest; + handle command TestDifferentVendorMeiRequest; + handle command TestDifferentVendorMeiResponse; } } endpoint 2 { diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index bc71f582f4bc33..7197ba5cde3696 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -9088,6 +9088,38 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "TestBatchHelperRequest", + "code": 22, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TestSecondBatchHelperRequest", + "code": 23, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TestDifferentVendorMeiRequest", + "code": 4294049962, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TestDifferentVendorMeiResponse", + "code": 4294049979, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -10371,6 +10403,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "write_only_int8u", + "code": 16426, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeiInt8u", + "code": 4294070017, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -10418,6 +10482,13 @@ "mfgCode": null, "side": "server", "included": 1 + }, + { + "name": "TestDifferentVendorMeiEvent", + "code": 4294050030, + "mfgCode": null, + "side": "server", + "included": 1 } ] } diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index cfecf37ec14929..8d23cd3075db54 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -780,6 +780,27 @@ static bool SendBooleanResponse(CommandHandler * commandObj, const ConcreteComma return true; } +bool emberAfUnitTestingClusterTestDifferentVendorMeiRequestCallback( + app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::TestDifferentVendorMeiRequest::DecodableType & commandData) +{ + Commands::TestDifferentVendorMeiResponse::Type response; + + { + Events::TestDifferentVendorMeiEvent::Type event{ commandData.arg1 }; + + if (CHIP_NO_ERROR != LogEvent(event, commandPath.mEndpointId, response.eventNumber)) + { + commandObj->AddStatus(commandPath, Status::Failure); + return true; + } + } + + response.arg1 = commandData.arg1; + commandObj->AddResponse(commandPath, response); + return true; +} + bool emberAfUnitTestingClusterTestStructArgumentRequestCallback( app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::TestStructArgumentRequest::DecodableType & commandData) @@ -833,6 +854,7 @@ bool emberAfUnitTestingClusterTestEmitTestEventRequestCallback( commandObj->AddStatus(commandPath, Status::Failure); return true; } + commandObj->AddResponse(commandPath, responseData); return true; } diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index c6e8dc0946970c..d51aea86b777f6 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -1317,6 +1317,17 @@ tests: h: 0.1, } + - label: "Send MEI command in cluster" + command: "TestDifferentVendorMeiRequest" + arguments: + values: + - name: "arg1" + value: 76 + response: + values: + - name: "arg1" + value: 76 + # Tests for List - label: "Send Test Command With List of INT8U and none of them is set to 0" @@ -3850,7 +3861,19 @@ tests: # here yet. error: FAILURE - - label: "read AcceptedCommandList attribute" + - label: "Write different vendor MEI attribute" + command: "writeAttribute" + attribute: "mei_int8u" + arguments: + value: 201 + + - label: "Verify different vendor MEI attribute" + command: "readAttribute" + attribute: "mei_int8u" + response: + value: 201 + + - label: "Validate AcceptedCommandList attribute" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -3876,13 +3899,21 @@ tests: 21, 22, 23, + 4294049962, ] - - label: "read GeneratedCommandList attribute" + - label: "Validate GeneratedCommandList attribute" command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [0, 1, 4, 5, 6, 8, 9, 10, 11, 12] + value: [0, 1, 4, 5, 6, 8, 9, 10, 11, 12, 4294049979] + + - label: "Validate presence of MEI attribute" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + contains: [4294070017] # Struct-typed attribute - label: "Write struct-typed attribute" diff --git a/src/app/tests/suites/TestUnitTestingClusterMei.yaml b/src/app/tests/suites/TestUnitTestingClusterMei.yaml new file mode 100644 index 00000000000000..542c5568cbbbc7 --- /dev/null +++ b/src/app/tests/suites/TestUnitTestingClusterMei.yaml @@ -0,0 +1,103 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Unit Testing Cluster MEI Elements Tests + +config: + nodeId: 0x12344321 + cluster: "Unit Testing" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Write different vendor MEI attribute" + command: "writeAttribute" + attribute: "mei_int8u" + arguments: + value: 201 + + - label: "Verify different vendor MEI attribute" + command: "readAttribute" + attribute: "mei_int8u" + response: + value: 201 + + - label: "Validate AcceptedCommandList attribute" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + contains: [4294049962] + + - label: "Validate GeneratedCommandList attribute" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + contains: [0, 1, 4, 5, 6, 8, 9, 10, 11, 12, 4294049979] + + - label: "Validate presence of MEI attribute" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4294070017] + + - label: "Send MEI command and force event generation" + command: "TestDifferentVendorMeiRequest" + arguments: + values: + - name: "arg1" + value: 76 + response: + values: + - name: "arg1" + value: 76 + - name: "eventNumber" + saveAs: firstMeiEventNumber + + - label: "Validate event generation 1/2" + command: "readEvent" + event: "TestDifferentVendorMeiEvent" + eventNumber: firstMeiEventNumber + response: + value: { arg1: 76 } + + - label: "Force event generation" + command: "TestEmitTestEventRequest" + arguments: + values: + - name: "arg1" + value: 42 + - name: "arg2" + value: 1 + - name: "arg3" + value: true + response: + values: + - name: "value" + saveAs: firstEventNumber + + - label: "Validate event generation 2/2" + command: "readEvent" + event: "TestEvent" + eventNumber: firstEventNumber diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index 7fdc585a0c82e9..d0312fdc9a8982 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -127,7 +127,7 @@ limitations under the License. - + @@ -135,7 +135,7 @@ limitations under the License. - + CHIP Unit Testing @@ -234,6 +234,9 @@ limitations under the License. write_only_int8u + + mei_int8u + unsupported @@ -461,6 +464,14 @@ limitations under the License. + + + Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. + + + + Simple response for TestWithResponse with a simple return value @@ -594,6 +605,14 @@ limitations under the License. + + + Response to TestDifferentVendorMeiRequest, which is a command having a different MEI vendor ID than the cluster. + + + > + + Example test event @@ -608,5 +627,9 @@ limitations under the License. Example test event + + Example test event having a different vendor ID in the MEI than the cluster. + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f34ac739a3e152..9c2ec6c7a726d3 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -8734,6 +8734,10 @@ internal cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + info event TestDifferentVendorMeiEvent = 4294050030 { + int8u arg1 = 1; + } + attribute boolean boolean = 0; attribute Bitmap8MaskMap bitmap8 = 1; attribute Bitmap16MaskMap bitmap16 = 2; @@ -8816,6 +8820,7 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -9011,6 +9016,15 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } + request struct TestDifferentVendorMeiRequestRequest { + int8u arg1 = 0; + } + + response struct TestDifferentVendorMeiResponse = 4294049979 { + int8u arg1 = 0; + int64u eventNumber = 1; + } + /** Simple command without any parameters and without a specific response. To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; @@ -9081,6 +9095,8 @@ internal cluster UnitTesting = 4294048773 { command TestBatchHelperRequest(TestBatchHelperRequestRequest): TestBatchHelperResponse = 22; /** Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. */ command TestSecondBatchHelperRequest(TestSecondBatchHelperRequestRequest): TestBatchHelperResponse = 23; + /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ + command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } /** The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 3589464e7b8844..b47a9322d958fc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -59020,6 +59020,7 @@ public static class UnitTestingCluster extends BaseChipCluster { private static final long NULLABLE_RANGE_RESTRICTED_INT16U_ATTRIBUTE_ID = 16424L; private static final long NULLABLE_RANGE_RESTRICTED_INT16S_ATTRIBUTE_ID = 16425L; private static final long WRITE_ONLY_INT8U_ATTRIBUTE_ID = 16426L; + private static final long MEI_INT8U_ATTRIBUTE_ID = 4294070017L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -60032,6 +60033,43 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public void testDifferentVendorMeiRequest(TestDifferentVendorMeiResponseCallback callback, Integer arg1) { + testDifferentVendorMeiRequest(callback, arg1, 0); + } + + public void testDifferentVendorMeiRequest(TestDifferentVendorMeiResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + final long commandId = 4294049962L; + + ArrayList elements = new ArrayList<>(); + final long arg1FieldID = 0L; + BaseTLVType arg1tlvValue = new UIntType(arg1); + elements.add(new StructElement(arg1FieldID, arg1tlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long arg1FieldID = 0L; + Integer arg1 = null; + final long eventNumberFieldID = 1L; + Long eventNumber = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == arg1FieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + arg1 = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == eventNumberFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + eventNumber = castingValue.value(Long.class); + } + } + } + callback.onSuccess(arg1, eventNumber); + }}, commandId, value, timedInvokeTimeoutMs); + } + public interface TestSpecificResponseCallback extends BaseClusterCallback { void onSuccess(Integer returnValue); } @@ -60084,6 +60122,10 @@ public interface TestBatchHelperResponseCallback extends BaseClusterCallback { void onSuccess(byte[] buffer); } + public interface TestDifferentVendorMeiResponseCallback extends BaseClusterCallback { + void onSuccess(Integer arg1, Long eventNumber); + } + public interface ListInt8uAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -63049,6 +63091,40 @@ public void onSuccess(byte[] tlv) { }, WRITE_ONLY_INT8U_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readMeiInt8uAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEI_INT8U_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MEI_INT8U_ATTRIBUTE_ID, true); + } + + public void writeMeiInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeMeiInt8uAttribute(callback, value, 0); + } + + public void writeMeiInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MEI_INT8U_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMeiInt8uAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEI_INT8U_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MEI_INT8U_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index def1215e58117d..2fce0d9f588dfc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -5838,6 +5838,52 @@ public String toString() { return output.toString(); } } +public static class UnitTestingClusterTestDifferentVendorMeiEventEvent { + public Integer arg1; + private static final long ARG1_ID = 1L; + + public UnitTestingClusterTestDifferentVendorMeiEventEvent( + Integer arg1 + ) { + this.arg1 = arg1; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ARG1_ID, new UIntType(arg1))); + + return new StructType(values); + } + + public static UnitTestingClusterTestDifferentVendorMeiEventEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer arg1 = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ARG1_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + arg1 = castingValue.value(Integer.class); + } + } + } + return new UnitTestingClusterTestDifferentVendorMeiEventEvent( + arg1 + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("UnitTestingClusterTestDifferentVendorMeiEventEvent {\n"); + output.append("\targ1: "); + output.append(arg1); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class SampleMeiClusterPingCountEventEvent { public Long count; public Integer fabricIndex; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 9c50d04f325b50..6a95ee17097bc7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -16300,6 +16300,7 @@ public enum Attribute { NullableRangeRestrictedInt16u(16424L), NullableRangeRestrictedInt16s(16425L), WriteOnlyInt8u(16426L), + MeiInt8u(4294070017L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -16327,7 +16328,8 @@ public static Attribute value(long id) throws NoSuchFieldError { public enum Event { TestEvent(1L), - TestFabricScopedEvent(2L),; + TestFabricScopedEvent(2L), + TestDifferentVendorMeiEvent(4294050030L),; private final long id; Event(long id) { this.id = id; @@ -16371,7 +16373,8 @@ public enum Command { TestEmitTestEventRequest(20L), TestEmitTestFabricScopedEventRequest(21L), TestBatchHelperRequest(22L), - TestSecondBatchHelperRequest(23L),; + TestSecondBatchHelperRequest(23L), + TestDifferentVendorMeiRequest(4294049962L),; private final long id; Command(long id) { this.id = id; @@ -16712,6 +16715,23 @@ public static TestSecondBatchHelperRequestCommandField value(int id) throws NoSu } throw new NoSuchFieldError(); } + }public enum TestDifferentVendorMeiRequestCommandField {Arg1(0),; + private final int id; + TestDifferentVendorMeiRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static TestDifferentVendorMeiRequestCommandField value(int id) throws NoSuchFieldError { + for (TestDifferentVendorMeiRequestCommandField field : TestDifferentVendorMeiRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 9dd2bb422ce84c..1232c45d640ae7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -18930,6 +18930,30 @@ public void onError(Exception error) { callback.onFailure(error); } } + + public static class DelegatedUnitTestingClusterTestDifferentVendorMeiResponseCallback implements ChipClusters.UnitTestingCluster.TestDifferentVendorMeiResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer arg1, Long eventNumber) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); + responseValues.put(arg1ResponseValue, arg1); + CommandResponseInfo eventNumberResponseValue = new CommandResponseInfo("eventNumber", "Long"); + responseValues.put(eventNumberResponseValue, eventNumber); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedUnitTestingClusterListInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.ListInt8uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -27059,6 +27083,24 @@ public Map> getCommandMap() { ); unitTestingClusterInteractionInfoMap.put("testSecondBatchHelperRequest", unitTestingtestSecondBatchHelperRequestInteractionInfo); + Map unitTestingtestDifferentVendorMeiRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo unitTestingtestDifferentVendorMeiRequestarg1CommandParameterInfo = new CommandParameterInfo("arg1", Integer.class, Integer.class); + unitTestingtestDifferentVendorMeiRequestCommandParams.put("arg1",unitTestingtestDifferentVendorMeiRequestarg1CommandParameterInfo); + InteractionInfo unitTestingtestDifferentVendorMeiRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster) + .testDifferentVendorMeiRequest((ChipClusters.UnitTestingCluster.TestDifferentVendorMeiResponseCallback) callback + , (Integer) + commandArguments.get("arg1") + + ); + }, + () -> new DelegatedUnitTestingClusterTestDifferentVendorMeiResponseCallback(), + unitTestingtestDifferentVendorMeiRequestCommandParams + ); + unitTestingClusterInteractionInfoMap.put("testDifferentVendorMeiRequest", unitTestingtestDifferentVendorMeiRequestInteractionInfo); + commandMap.put("unitTesting", unitTestingClusterInteractionInfoMap); Map faultInjectionClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 260caf071281da..efa3c4658bb5b8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -19812,6 +19812,17 @@ private static Map readUnitTestingInteractionInfo() { readUnitTestingWriteOnlyInt8uCommandParams ); result.put("readWriteOnlyInt8uAttribute", readUnitTestingWriteOnlyInt8uAttributeInteractionInfo); + Map readUnitTestingMeiInt8uCommandParams = new LinkedHashMap(); + InteractionInfo readUnitTestingMeiInt8uAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).readMeiInt8uAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readUnitTestingMeiInt8uCommandParams + ); + result.put("readMeiInt8uAttribute", readUnitTestingMeiInt8uAttributeInteractionInfo); Map readUnitTestingGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readUnitTestingGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index f854f52c4e0d56..9d4a24661bf16a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -5509,6 +5509,28 @@ public Map> getWriteAttributeMap() { writeUnitTestingWriteOnlyInt8uCommandParams ); writeUnitTestingInteractionInfo.put("writeWriteOnlyInt8uAttribute", writeUnitTestingWriteOnlyInt8uAttributeInteractionInfo); + Map writeUnitTestingMeiInt8uCommandParams = new LinkedHashMap(); + CommandParameterInfo unitTestingmeiInt8uCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeUnitTestingMeiInt8uCommandParams.put( + "value", + unitTestingmeiInt8uCommandParameterInfo + ); + InteractionInfo writeUnitTestingMeiInt8uAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).writeMeiInt8uAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeUnitTestingMeiInt8uCommandParams + ); + writeUnitTestingInteractionInfo.put("writeMeiInt8uAttribute", writeUnitTestingMeiInt8uAttributeInteractionInfo); writeAttributeMap.put("unitTesting", writeUnitTestingInteractionInfo); Map writeFaultInjectionInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("faultInjection", writeFaultInjectionInteractionInfo); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt new file mode 100644 index 00000000000000..034966430b11c4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestDifferentVendorMeiEventEvent(val arg1: UInt) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestDifferentVendorMeiEventEvent {\n") + append("\targ1 : $arg1\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ARG1), arg1) + endStructure() + } + } + + companion object { + private const val TAG_ARG1 = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): UnitTestingClusterTestDifferentVendorMeiEventEvent { + tlvReader.enterStructure(tlvTag) + val arg1 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG1)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestDifferentVendorMeiEventEvent(arg1) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index b0b58a8d5f5cfe..2af0e85f583ec8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -202,6 +202,7 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt index 468d4e4b310802..dd71f008893fa9 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt @@ -121,6 +121,8 @@ class UnitTestingCluster(private val controller: MatterController, private val e class TestBatchHelperResponse(val buffer: ByteArray) + class TestDifferentVendorMeiResponse(val arg1: UByte, val eventNumber: ULong) + class ListInt8uAttribute(val value: List) sealed class ListInt8uAttributeSubscriptionState { @@ -2335,6 +2337,64 @@ class UnitTestingCluster(private val controller: MatterController, private val e return TestBatchHelperResponse(buffer_decoded) } + suspend fun testDifferentVendorMeiRequest( + arg1: UByte, + timedInvokeTimeout: Duration? = null + ): TestDifferentVendorMeiResponse { + val commandId: UInt = 4294049962u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ARG1_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ARG1_REQ), arg1) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_ARG1: Int = 0 + var arg1_decoded: UByte? = null + + val TAG_EVENT_NUMBER: Int = 1 + var eventNumber_decoded: ULong? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_ARG1)) { + arg1_decoded = tlvReader.getUByte(tag) + } + + if (tag == ContextSpecificTag(TAG_EVENT_NUMBER)) { + eventNumber_decoded = tlvReader.getULong(tag) + } else { + tlvReader.skipElement() + } + } + + if (arg1_decoded == null) { + throw IllegalStateException("arg1 not found in TLV") + } + + if (eventNumber_decoded == null) { + throw IllegalStateException("eventNumber not found in TLV") + } + + tlvReader.exitContainer() + + return TestDifferentVendorMeiResponse(arg1_decoded, eventNumber_decoded) + } + suspend fun readBooleanAttribute(): Boolean { val ATTRIBUTE_ID: UInt = 0u @@ -12942,6 +13002,127 @@ class UnitTestingCluster(private val controller: MatterController, private val e } } + suspend fun readMeiInt8uAttribute(): UByte { + val ATTRIBUTE_ID: UInt = 4294070017u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Meiint8u attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + + return decodedValue + } + + suspend fun writeMeiInt8uAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 4294070017u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded() + ) + ), + timedRequest = timedWriteTimeout + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMeiInt8uAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 4294070017u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Meiint8u attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + + emit(UByteSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt new file mode 100644 index 00000000000000..db7bddcfeb96e1 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.eventstructs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestDifferentVendorMeiEventEvent(val arg1: UByte) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestDifferentVendorMeiEventEvent {\n") + append("\targ1 : $arg1\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ARG1), arg1) + endStructure() + } + } + + companion object { + private const val TAG_ARG1 = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): UnitTestingClusterTestDifferentVendorMeiEventEvent { + tlvReader.enterStructure(tlvTag) + val arg1 = tlvReader.getUByte(ContextSpecificTag(TAG_ARG1)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestDifferentVendorMeiEventEvent(arg1) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 63e3175b3e0a60..948acea4fffff5 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -202,6 +202,7 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 18b68d270de099..bad7740f5be819 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -43887,6 +43887,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::MeiInt8u::Id: { + using TypeInfo = Attributes::MeiInt8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index cd75dc3c3bc28c..489d47c4af17ce 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -15114,6 +15114,58 @@ JNI_METHOD(void, UnitTestingCluster, writeWriteOnlyInt8uAttribute) onFailure.release(); } +JNI_METHOD(void, UnitTestingCluster, writeMeiInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::MeiInt8u::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, SampleMeiCluster, writeFlipFlopAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index e769d1b6390a37..c69aaf67df9e4d 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -7677,6 +7677,44 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return value; } + case Events::TestDifferentVendorMeiEvent::Id: { + Events::TestDifferentVendorMeiEvent::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_arg1; + std::string value_arg1ClassName = "java/lang/Integer"; + std::string value_arg1CtorSignature = "(I)V"; + jint jnivalue_arg1 = static_cast(cppValue.arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), + jnivalue_arg1, value_arg1); + + jclass testDifferentVendorMeiEventStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$UnitTestingClusterTestDifferentVendorMeiEventEvent", + testDifferentVendorMeiEventStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$UnitTestingClusterTestDifferentVendorMeiEventEvent"); + return nullptr; + } + + jmethodID testDifferentVendorMeiEventStructCtor; + err = chip::JniReferences::GetInstance().FindMethod(env, testDifferentVendorMeiEventStructClass, "", + "(Ljava/lang/Integer;)V", &testDifferentVendorMeiEventStructCtor); + if (err != CHIP_NO_ERROR || testDifferentVendorMeiEventStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$UnitTestingClusterTestDifferentVendorMeiEventEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(testDifferentVendorMeiEventStructClass, testDifferentVendorMeiEventStructCtor, value_arg1); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 32d21277117e5e..8f9274f6171770 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -8395,6 +8395,73 @@ void CHIPUnitTestingClusterTestBatchHelperResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, buffer); } +CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::~CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject arg1; + std::string arg1ClassName = "java/lang/Integer"; + std::string arg1CtorSignature = "(I)V"; + jint jniarg1 = static_cast(dataResponse.arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), jniarg1, arg1); + jobject eventNumber; + std::string eventNumberClassName = "java/lang/Long"; + std::string eventNumberCtorSignature = "(J)V"; + jlong jnieventNumber = static_cast(dataResponse.eventNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(eventNumberClassName.c_str(), eventNumberCtorSignature.c_str(), + jnieventNumber, eventNumber); + + env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, eventNumber); +} CHIPSampleMeiClusterAddArgumentsResponseCallback::CHIPSampleMeiClusterAddArgumentsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 70befc9c57771c..53212aa8617211 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -1152,6 +1152,21 @@ class CHIPUnitTestingClusterTestBatchHelperResponseCallback jobject javaCallbackRef; }; +class CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback + : public Callback::Callback +{ +public: + CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback(jobject javaCallback); + + ~CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPSampleMeiClusterAddArgumentsResponseCallback : public Callback::Callback { diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 6b4dce2e8edb4f..dd1af821617b0f 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -13499,6 +13499,13 @@ class ChipClusters: "fillCharacter": "int", }, }, + 0xFFF200AA: { + "commandId": 0xFFF200AA, + "commandName": "TestDifferentVendorMeiRequest", + "args": { + "arg1": "int", + }, + }, }, "attributes": { 0x00000000: { @@ -14111,6 +14118,13 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0xFFF24F01: { + "attributeName": "MeiInt8u", + "attributeId": 0xFFF24F01, + "type": "int", + "reportable": True, + "writable": True, + }, }, } _FAULT_INJECTION_CLUSTER_INFO = { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c01cbca7f1780d..1c184fe18f8dc9 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -46050,6 +46050,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ClusterObjectFieldDescriptor(Label="meiInt8u", Tag=0xFFF24F01, Type=uint), ]) boolean: 'bool' = None @@ -46140,6 +46141,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: attributeList: 'typing.List[uint]' = None featureMap: 'uint' = None clusterRevision: 'uint' = None + meiInt8u: 'uint' = None class Enums: class SimpleEnum(MatterIntEnum): @@ -47031,6 +47033,40 @@ def descriptor(cls) -> ClusterObjectDescriptor: sizeOfResponseBuffer: 'uint' = 0 fillCharacter: 'uint' = 0 + @dataclass + class TestDifferentVendorMeiRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0xFFF1FC05 + command_id: typing.ClassVar[int] = 0xFFF200AA + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestDifferentVendorMeiResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint), + ]) + + arg1: 'uint' = 0 + + @dataclass + class TestDifferentVendorMeiResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0xFFF1FC05 + command_id: typing.ClassVar[int] = 0xFFF200BB + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="eventNumber", Tag=1, Type=uint), + ]) + + arg1: 'uint' = 0 + eventNumber: 'uint' = 0 + class Attributes: @dataclass class Boolean(ClusterAttributeDescriptor): @@ -48444,6 +48480,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class MeiInt8u(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC05 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0xFFF24F01 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + class Events: @dataclass class TestEvent(ClusterEvent): @@ -48493,6 +48545,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: fabricIndex: 'uint' = 0 + @dataclass + class TestDifferentVendorMeiEvent(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC05 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0xFFF200EE + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="arg1", Tag=1, Type=uint), + ]) + + arg1: 'uint' = 0 + @dataclass class FaultInjection(Cluster): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index c80f646ae2291e..e190bc97debd9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -6324,6 +6324,9 @@ static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId) case Attributes::ClusterRevision::Id: { return YES; } + case Attributes::MeiInt8u::Id: { + return YES; + } default: { return NO; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 51d8e36f36bf1d..3913c23eae31f8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -18601,6 +18601,17 @@ static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttri value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::MeiInt8u::Id: { + using TypeInfo = Attributes::MeiInt8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index d3a2765c37daf5..b8a7e10242e7b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -15181,6 +15181,12 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. */ - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondBatchHelperRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command TestDifferentVendorMeiRequest + * + * Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. + */ +- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -15874,6 +15880,14 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeMeiInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMeiInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMeiInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index c3d28d9efa5957..7e2d9c98fe2270 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -111416,6 +111416,30 @@ - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondB queue:self.callbackQueue completion:responseHandler]; } +- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRUnitTestingClusterTestDifferentVendorMeiRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = UnitTesting::Commands::TestDifferentVendorMeiRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRUnitTestingClusterTestDifferentVendorMeiResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -117400,6 +117424,70 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } +- (void)readAttributeMeiInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMeiInt8uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeiInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + @end @implementation MTRBaseClusterTestCluster diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 20eea6f8af5a46..6cf1cb51a92c82 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -5646,6 +5646,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID MTR_PROVISIONALLY_AVAILABLE = 0xFFF24F01, // Cluster SampleMEI attributes MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6899,6 +6900,8 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000015, MTRCommandIDTypeClusterUnitTestingCommandTestBatchHelperRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000016, MTRCommandIDTypeClusterUnitTestingCommandTestSecondBatchHelperRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000017, + MTRCommandIDTypeClusterUnitTestingCommandTestDifferentVendorMeiRequestID MTR_PROVISIONALLY_AVAILABLE = 0xFFF200AA, + MTRCommandIDTypeClusterUnitTestingCommandTestDifferentVendorMeiResponseID MTR_PROVISIONALLY_AVAILABLE = 0xFFF200BB, // Cluster SampleMEI commands MTRCommandIDTypeClusterSampleMEICommandPingID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -7288,6 +7291,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster UnitTesting events MTREventIDTypeClusterUnitTestingEventTestEventID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTREventIDTypeClusterUnitTestingEventTestFabricScopedEventID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, + MTREventIDTypeClusterUnitTestingEventTestDifferentVendorMeiEventID MTR_PROVISIONALLY_AVAILABLE = 0xFFF200EE, // Cluster SampleMEI events MTREventIDTypeClusterSampleMEIEventPingCountEventID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index f80c2b21fb7483..9cbe6921ee0b60 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -6905,6 +6905,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)testBatchHelperRequestWithParams:(MTRUnitTestingClusterTestBatchHelperRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondBatchHelperRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -7246,6 +7247,10 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary * _Nullable)readAttributeMeiInt8uWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 66330dfcc186ab..112012d598cd45 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -20565,6 +20565,33 @@ - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondB completion:responseHandler]; } +- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRUnitTestingClusterTestDifferentVendorMeiRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = UnitTesting::Commands::TestDifferentVendorMeiRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRUnitTestingClusterTestDifferentVendorMeiResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; @@ -21910,6 +21937,22 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; } +- (NSDictionary * _Nullable)readAttributeMeiInt8uWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) params:params]; +} + +- (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMeiInt8uWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + @end @implementation MTRClusterTestCluster @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 7856a0a5c209c7..d64c9fceddec05 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -12688,6 +12688,57 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRUnitTestingClusterTestDifferentVendorMeiRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull arg1 MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRUnitTestingClusterTestDifferentVendorMeiResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull arg1 MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull eventNumber MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRUnitTestingClusterTestDifferentVendorMeiResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRSampleMEIClusterPingParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index f6c43e346e96b7..8411366a4fd937 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -34196,6 +34196,170 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRUnitTestingClusterTestDifferentVendorMeiRequestParams +- (instancetype)init +{ + if (self = [super init]) { + + _arg1 = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRUnitTestingClusterTestDifferentVendorMeiRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; + return descriptionString; +} + +@end + +@implementation MTRUnitTestingClusterTestDifferentVendorMeiRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.arg1 = self.arg1.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRUnitTestingClusterTestDifferentVendorMeiResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _arg1 = @(0); + + _eventNumber = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRUnitTestingClusterTestDifferentVendorMeiResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.eventNumber = self.eventNumber; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; eventNumber:%@; >", NSStringFromClass([self class]), _arg1, _eventNumber]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRUnitTestingClusterTestDifferentVendorMeiResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType &)decodableStruct +{ + { + self.arg1 = [NSNumber numberWithUnsignedChar:decodableStruct.arg1]; + } + { + self.eventNumber = [NSNumber numberWithUnsignedLongLong:decodableStruct.eventNumber]; + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRSampleMEIClusterPingParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 0ff3eb9bebda17..e38b528d3dc220 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -2152,6 +2152,18 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRUnitTestingClusterTestDifferentVendorMeiRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRUnitTestingClusterTestDifferentVendorMeiResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType &)decodableStruct; + +@end + @interface MTRSampleMEIClusterPingParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 3e14aa083e6a79..106ae0cfbcda04 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -4280,6 +4280,23 @@ static id _Nullable DecodeEventPayloadForUnitTestingCluster(EventId aEventId, TL return value; } + case Events::TestDifferentVendorMeiEvent::Id: { + Events::TestDifferentVendorMeiEvent::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRUnitTestingClusterTestDifferentVendorMeiEventEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.arg1]; + value.arg1 = memberValue; + } while (0); + + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 58fb860024e7d0..68069d30942dd7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -2046,6 +2046,11 @@ MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRUnitTestingClusterTestDifferentVendorMeiEventEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull arg1 MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRSampleMEIClusterPingCountEventEvent : NSObject @property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 9632ebb2fda3bb..235a28427843fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -8103,6 +8103,33 @@ @implementation MTRTestClusterClusterTestFabricScopedEventEvent : MTRUnitTesting @dynamic fabricIndex; @end +@implementation MTRUnitTestingClusterTestDifferentVendorMeiEventEvent +- (instancetype)init +{ + if (self = [super init]) { + + _arg1 = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRUnitTestingClusterTestDifferentVendorMeiEventEvent alloc] init]; + + other.arg1 = self.arg1; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; + return descriptionString; +} + +@end + @implementation MTRSampleMEIClusterPingCountEventEvent - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index b9e3ede1ac5869..5b38b98fb9d2ad 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -31310,6 +31310,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace ClusterRevision +namespace MeiInt8u { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MeiInt8u + } // namespace Attributes } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 27d2c94ffd63c2..35aea79a2bf140 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -5498,6 +5498,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision +namespace MeiInt8u { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace MeiInt8u + } // namespace Attributes } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 823fce7d6a0433..c06aaf26cb8abf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -6409,6 +6409,12 @@ bool emberAfUnitTestingClusterTestBatchHelperRequestCallback( bool emberAfUnitTestingClusterTestSecondBatchHelperRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::UnitTesting::Commands::TestSecondBatchHelperRequest::DecodableType & commandData); +/** + * @brief Unit Testing Cluster TestDifferentVendorMeiRequest Command callback (from client) + */ +bool emberAfUnitTestingClusterTestDifferentVendorMeiRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::DecodableType & commandData); /** * @brief Fault Injection Cluster FailAtFault Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 4705b58ec7c101..ba89586525a20f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -28411,6 +28411,79 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace TestSecondBatchHelperRequest. +namespace TestDifferentVendorMeiRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kArg1), arg1); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kArg1)) + { + err = DataModel::Decode(reader, arg1); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace TestDifferentVendorMeiRequest. +namespace TestDifferentVendorMeiResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kArg1), arg1); + encoder.Encode(to_underlying(Fields::kEventNumber), eventNumber); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kArg1)) + { + err = DataModel::Decode(reader, arg1); + } + else if (__context_tag == to_underlying(Fields::kEventNumber)) + { + err = DataModel::Decode(reader, eventNumber); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace TestDifferentVendorMeiResponse. } // namespace Commands namespace Attributes { @@ -28594,6 +28667,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, featureMap); case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, clusterRevision); + case Attributes::MeiInt8u::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, meiInt8u); default: return CHIP_NO_ERROR; } @@ -28696,6 +28771,41 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace TestFabricScopedEvent. +namespace TestDifferentVendorMeiEvent { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kArg1)) + { + err = DataModel::Decode(reader, arg1); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace TestDifferentVendorMeiEvent. } // namespace Events } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 2aa7bcf708cc71..ae1b3ab26c5ee1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -40911,6 +40911,16 @@ struct Type; struct DecodableType; } // namespace TestSecondBatchHelperRequest +namespace TestDifferentVendorMeiRequest { +struct Type; +struct DecodableType; +} // namespace TestDifferentVendorMeiRequest + +namespace TestDifferentVendorMeiResponse { +struct Type; +struct DecodableType; +} // namespace TestDifferentVendorMeiResponse + } // namespace Commands namespace Commands { @@ -42258,6 +42268,73 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestSecondBatchHelperRequest +namespace TestDifferentVendorMeiRequest { +enum class Fields : uint8_t +{ + kArg1 = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::TestDifferentVendorMeiRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + + uint8_t arg1 = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::TestDifferentVendorMeiRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + + uint8_t arg1 = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace TestDifferentVendorMeiRequest +namespace TestDifferentVendorMeiResponse { +enum class Fields : uint8_t +{ + kArg1 = 0, + kEventNumber = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::TestDifferentVendorMeiResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + + uint8_t arg1 = static_cast(0); + uint64_t eventNumber = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::TestDifferentVendorMeiResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + + uint8_t arg1 = static_cast(0); + uint64_t eventNumber = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace TestDifferentVendorMeiResponse } // namespace Commands namespace Attributes { @@ -43299,6 +43376,18 @@ struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInf static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } }; } // namespace ClusterRevision +namespace MeiInt8u { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeiInt8u::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeiInt8u struct TypeInfo { @@ -43400,6 +43489,7 @@ struct TypeInfo Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + Attributes::MeiInt8u::TypeInfo::DecodableType meiInt8u = static_cast(0); }; }; } // namespace Attributes @@ -43487,6 +43577,39 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace TestFabricScopedEvent +namespace TestDifferentVendorMeiEvent { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kArg1 = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TestDifferentVendorMeiEvent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + static constexpr bool kIsFabricScoped = false; + + uint8_t arg1 = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TestDifferentVendorMeiEvent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + + uint8_t arg1 = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace TestDifferentVendorMeiEvent } // namespace Events } // namespace UnitTesting namespace FaultInjection { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 5b0733883f6c71..08c0d60d94afb0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -7890,6 +7890,10 @@ namespace ClusterRevision { static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision +namespace MeiInt8u { +static constexpr AttributeId Id = 0xFFF24F01; +} // namespace MeiInt8u + } // namespace Attributes } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 79c375c132f7a9..d3097ba5188c2c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1844,6 +1844,14 @@ namespace TestSecondBatchHelperRequest { static constexpr CommandId Id = 0x00000017; } // namespace TestSecondBatchHelperRequest +namespace TestDifferentVendorMeiRequest { +static constexpr CommandId Id = 0xFFF200AA; +} // namespace TestDifferentVendorMeiRequest + +namespace TestDifferentVendorMeiResponse { +static constexpr CommandId Id = 0xFFF200BB; +} // namespace TestDifferentVendorMeiResponse + } // namespace Commands } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 0ea221e713cc6c..07c7f2537fdff8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -634,6 +634,10 @@ namespace TestFabricScopedEvent { static constexpr EventId Id = 0x00000002; } // namespace TestFabricScopedEvent +namespace TestDifferentVendorMeiEvent { +static constexpr EventId Id = 0xFFF200EE; +} // namespace TestDifferentVendorMeiEvent + } // namespace Events } // namespace UnitTesting diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index ad444538f4c6d7..854e51ce08f135 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -13288,6 +13288,7 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand | * TestEmitTestFabricScopedEventRequest | 0x15 | | * TestBatchHelperRequest | 0x16 | | * TestSecondBatchHelperRequest | 0x17 | +| * TestDifferentVendorMeiRequest | 0xFFF200AA| |------------------------------------------------------------------------------| | Attributes: | | | * Boolean | 0x0000 | @@ -13378,10 +13379,12 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand | * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | +| * MeiInt8u | 0xFFF24F01| |------------------------------------------------------------------------------| | Events: | | | * TestEvent | 0x0001 | | * TestFabricScopedEvent | 0x0002 | +| * TestDifferentVendorMeiEvent | 0xFFF200EE| \*----------------------------------------------------------------------------*/ /* @@ -14348,6 +14351,44 @@ class UnitTestingTestSecondBatchHelperRequest : public ClusterCommand chip::app::Clusters::UnitTesting::Commands::TestSecondBatchHelperRequest::Type mRequest; }; +/* + * Command TestDifferentVendorMeiRequest + */ +class UnitTestingTestDifferentVendorMeiRequest : public ClusterCommand +{ +public: + UnitTestingTestDifferentVendorMeiRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-different-vendor-mei-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster FaultInjection | 0xFFF1FC06 | |------------------------------------------------------------------------------| @@ -25759,6 +25800,7 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -25856,6 +25898,7 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, "mei-int8u", Attributes::MeiInt8u::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "boolean", 0, 1, Attributes::Boolean::Id, WriteCommandType::kWrite, credsIssuerConfig), // @@ -26062,7 +26105,9 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "mei-int8u", 0, UINT8_MAX, Attributes::MeiInt8u::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "boolean", Attributes::Boolean::Id, credsIssuerConfig), // make_unique(Id, "bitmap8", Attributes::Bitmap8::Id, credsIssuerConfig), // @@ -26158,15 +26203,20 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, "mei-int8u", Attributes::MeiInt8u::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "test-event", Events::TestEvent::Id, credsIssuerConfig), // - make_unique(Id, "test-fabric-scoped-event", Events::TestFabricScopedEvent::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "test-event", Events::TestEvent::Id, credsIssuerConfig), // + make_unique(Id, "test-fabric-scoped-event", Events::TestFabricScopedEvent::Id, credsIssuerConfig), // + make_unique(Id, "test-different-vendor-mei-event", Events::TestDifferentVendorMeiEvent::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "test-event", Events::TestEvent::Id, credsIssuerConfig), // make_unique(Id, "test-fabric-scoped-event", Events::TestFabricScopedEvent::Id, credsIssuerConfig), // + make_unique(Id, "test-different-vendor-mei-event", Events::TestDifferentVendorMeiEvent::Id, + credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a3fb39de11e945..dc78dc02a54ee7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6832,6 +6832,22 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Events::TestDifferentVendorMeiEvent::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg1", indent + 1, value.arg1); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg1'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SampleMei::Events::PingCountEvent::DecodableType & value) { @@ -7610,6 +7626,15 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + ReturnErrorOnFailure(DataModelLogger::LogValue("eventNumber", indent + 1, value.eventNumber)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SampleMei::Commands::AddArgumentsResponse::DecodableType & value) { @@ -17329,6 +17354,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); } + case UnitTesting::Attributes::MeiInt8u::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("mei_int8u", 1, value); + } } break; } @@ -18011,6 +18041,11 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TestBatchHelperResponse", 1, value); } + case UnitTesting::Commands::TestDifferentVendorMeiResponse::Id: { + UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TestDifferentVendorMeiResponse", 1, value); + } } break; } @@ -18774,6 +18809,11 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TestFabricScopedEvent", 1, value); } + case UnitTesting::Events::TestDifferentVendorMeiEvent::Id: { + chip::app::Clusters::UnitTesting::Events::TestDifferentVendorMeiEvent::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TestDifferentVendorMeiEvent", 1, value); + } } break; } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 07f9c04cf92319..ee12e5116bd09a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -589,6 +589,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Events::TestFabricScopedEvent::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::UnitTesting::Events::TestDifferentVendorMeiEvent::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::SampleMei::Events::PingCountEvent::DecodableType & value); @@ -762,5 +764,7 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Commands::TestBatchHelperResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::SampleMei::Commands::AddArgumentsResponse::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 6bd4b24be69d98..3b62137fe4f5c7 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -165709,6 +165709,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA | * TestEmitTestFabricScopedEventRequest | 0x15 | | * TestBatchHelperRequest | 0x16 | | * TestSecondBatchHelperRequest | 0x17 | +| * TestDifferentVendorMeiRequest | 0xFFF200AA| |------------------------------------------------------------------------------| | Attributes: | | | * Boolean | 0x0000 | @@ -165799,10 +165800,12 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA | * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | +| * MeiInt8u | 0xFFF24F01| |------------------------------------------------------------------------------| | Events: | | | * TestEvent | 0x0001 | | * TestFabricScopedEvent | 0x0002 | +| * TestDifferentVendorMeiEvent | 0xFFF200EE| \*----------------------------------------------------------------------------*/ /* @@ -167539,6 +167542,65 @@ class UnitTestingTestSecondBatchHelperRequest : public ClusterCommand { chip::app::Clusters::UnitTesting::Commands::TestSecondBatchHelperRequest::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command TestDifferentVendorMeiRequest + */ +class UnitTestingTestDifferentVendorMeiRequest : public ClusterCommand { +public: + UnitTestingTestDifferentVendorMeiRequest() + : ClusterCommand("test-different-vendor-mei-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRUnitTestingClusterTestDifferentVendorMeiRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.arg1 = [NSNumber numberWithUnsignedChar:mRequest.arg1]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster testDifferentVendorMeiRequestWithParams:params completion: + ^(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiRequest::Type mRequest; +}; + #endif // MTR_ENABLE_PROVISIONAL /* @@ -178481,6 +178543,132 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute MeiInt8u + */ +class ReadUnitTestingMeiInt8u : public ReadAttribute { +public: + ReadUnitTestingMeiInt8u() + : ReadAttribute("mei-int8u") + { + } + + ~ReadUnitTestingMeiInt8u() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::MeiInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeiInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.MeiInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UnitTesting MeiInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteUnitTestingMeiInt8u : public WriteAttribute { +public: + WriteUnitTestingMeiInt8u() + : WriteAttribute("mei-int8u") + { + AddArgument("attr-name", "mei-int8u"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteUnitTestingMeiInt8u() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::MeiInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeMeiInt8uWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitTesting MeiInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeUnitTestingMeiInt8u : public SubscribeAttribute { +public: + SubscribeAttributeUnitTestingMeiInt8u() + : SubscribeAttribute("mei-int8u") + { + } + + ~SubscribeAttributeUnitTestingMeiInt8u() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::MeiInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMeiInt8uWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.MeiInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster SampleMei | 0xFFF1FC20 | @@ -186370,6 +186558,9 @@ void registerClusterUnitTesting(Commands & commands) #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -186634,6 +186825,11 @@ void registerClusterUnitTesting(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 64fae4505f0655..190e565d6a219b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -127768,1316 +127768,1332 @@ class TestCluster : public TestCommandBridge { err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_163(); break; case 164: - ChipLogProgress(chipTool, " ***** Test Step 164 : Send Test Command With List of INT8U and none of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_164(); + ChipLogProgress(chipTool, " ***** Test Step 164 : Send MEI command in cluster\n"); + err = TestSendMeiCommandInCluster_164(); break; case 165: - ChipLogProgress(chipTool, " ***** Test Step 165 : Send Test Command With List of INT8U and one of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_165(); + ChipLogProgress(chipTool, " ***** Test Step 165 : Send Test Command With List of INT8U and none of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_165(); break; case 166: - ChipLogProgress(chipTool, " ***** Test Step 166 : Send Test Command With List of INT8U and get it reversed\n"); - err = TestSendTestCommandWithListOfInt8uAndGetItReversed_166(); + ChipLogProgress(chipTool, " ***** Test Step 166 : Send Test Command With List of INT8U and one of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_166(); break; case 167: - ChipLogProgress(chipTool, " ***** Test Step 167 : Send Test Command With empty List of INT8U and get an empty list back\n"); - err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_167(); + ChipLogProgress(chipTool, " ***** Test Step 167 : Send Test Command With List of INT8U and get it reversed\n"); + err = TestSendTestCommandWithListOfInt8uAndGetItReversed_167(); break; case 168: - ChipLogProgress(chipTool, " ***** Test Step 168 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_168(); + ChipLogProgress(chipTool, " ***** Test Step 168 : Send Test Command With empty List of INT8U and get an empty list back\n"); + err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_168(); break; case 169: - ChipLogProgress(chipTool, " ***** Test Step 169 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_169(); + ChipLogProgress(chipTool, " ***** Test Step 169 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_169(); break; case 170: - ChipLogProgress(chipTool, " ***** Test Step 170 : Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true\n"); - err = TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_170(); + ChipLogProgress(chipTool, " ***** Test Step 170 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_170(); break; case 171: - ChipLogProgress(chipTool, " ***** Test Step 171 : Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false\n"); - err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_171(); + ChipLogProgress(chipTool, " ***** Test Step 171 : Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true\n"); + err = TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_171(); break; case 172: - ChipLogProgress(chipTool, " ***** Test Step 172 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); - err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_172(); + ChipLogProgress(chipTool, " ***** Test Step 172 : Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_172(); break; case 173: - ChipLogProgress(chipTool, " ***** Test Step 173 : Read attribute LIST With List of INT8U\n"); - err = TestReadAttributeListWithListOfInt8u_173(); + ChipLogProgress(chipTool, " ***** Test Step 173 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); + err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_173(); break; case 174: - ChipLogProgress(chipTool, " ***** Test Step 174 : Write attribute LIST With List of OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfOctetString_174(); + ChipLogProgress(chipTool, " ***** Test Step 174 : Read attribute LIST With List of INT8U\n"); + err = TestReadAttributeListWithListOfInt8u_174(); break; case 175: - ChipLogProgress(chipTool, " ***** Test Step 175 : Read attribute LIST With List of OCTET_STRING\n"); - err = TestReadAttributeListWithListOfOctetString_175(); + ChipLogProgress(chipTool, " ***** Test Step 175 : Write attribute LIST With List of OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfOctetString_175(); break; case 176: - ChipLogProgress(chipTool, " ***** Test Step 176 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfListStructOctetString_176(); + ChipLogProgress(chipTool, " ***** Test Step 176 : Read attribute LIST With List of OCTET_STRING\n"); + err = TestReadAttributeListWithListOfOctetString_176(); break; case 177: - ChipLogProgress(chipTool, " ***** Test Step 177 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestReadAttributeListWithListOfListStructOctetString_177(); + ChipLogProgress(chipTool, " ***** Test Step 177 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfListStructOctetString_177(); break; case 178: - ChipLogProgress(chipTool, " ***** Test Step 178 : Send Test Command with optional arg set.\n"); - err = TestSendTestCommandWithOptionalArgSet_178(); + ChipLogProgress(chipTool, " ***** Test Step 178 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestReadAttributeListWithListOfListStructOctetString_178(); break; case 179: - ChipLogProgress(chipTool, " ***** Test Step 179 : Send Test Command without its optional arg.\n"); - err = TestSendTestCommandWithoutItsOptionalArg_179(); + ChipLogProgress(chipTool, " ***** Test Step 179 : Send Test Command with optional arg set.\n"); + err = TestSendTestCommandWithOptionalArgSet_179(); break; case 180: - ChipLogProgress(chipTool, " ***** Test Step 180 : Read list of structs containing nullables and optionals\n"); - err = TestReadListOfStructsContainingNullablesAndOptionals_180(); + ChipLogProgress(chipTool, " ***** Test Step 180 : Send Test Command without its optional arg.\n"); + err = TestSendTestCommandWithoutItsOptionalArg_180(); break; case 181: - ChipLogProgress(chipTool, " ***** Test Step 181 : Write list of structs containing nullables and optionals\n"); - err = TestWriteListOfStructsContainingNullablesAndOptionals_181(); + ChipLogProgress(chipTool, " ***** Test Step 181 : Read list of structs containing nullables and optionals\n"); + err = TestReadListOfStructsContainingNullablesAndOptionals_181(); break; case 182: - ChipLogProgress(chipTool, " ***** Test Step 182 : Read list of structs containing nullables and optionals after writing\n"); - err = TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_182(); + ChipLogProgress(chipTool, " ***** Test Step 182 : Write list of structs containing nullables and optionals\n"); + err = TestWriteListOfStructsContainingNullablesAndOptionals_182(); break; case 183: - ChipLogProgress(chipTool, " ***** Test Step 183 : Write attribute NULLABLE_BOOLEAN null\n"); - err = TestWriteAttributeNullableBooleanNull_183(); + ChipLogProgress(chipTool, " ***** Test Step 183 : Read list of structs containing nullables and optionals after writing\n"); + err = TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_183(); break; case 184: - ChipLogProgress(chipTool, " ***** Test Step 184 : Read attribute NULLABLE_BOOLEAN null\n"); - err = TestReadAttributeNullableBooleanNull_184(); + ChipLogProgress(chipTool, " ***** Test Step 184 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_184(); break; case 185: - ChipLogProgress(chipTool, " ***** Test Step 185 : Write attribute NULLABLE_BOOLEAN True\n"); - err = TestWriteAttributeNullableBooleanTrue_185(); + ChipLogProgress(chipTool, " ***** Test Step 185 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_185(); break; case 186: - ChipLogProgress(chipTool, " ***** Test Step 186 : Read attribute NULLABLE_BOOLEAN True\n"); - err = TestReadAttributeNullableBooleanTrue_186(); + ChipLogProgress(chipTool, " ***** Test Step 186 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_186(); break; case 187: - ChipLogProgress(chipTool, " ***** Test Step 187 : Read attribute NULLABLE_BOOLEAN not null\n"); - err = TestReadAttributeNullableBooleanNotNull_187(); + ChipLogProgress(chipTool, " ***** Test Step 187 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_187(); break; case 188: - ChipLogProgress(chipTool, " ***** Test Step 188 : Write attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestWriteAttributeNullableBitmap8MaxValue_188(); + ChipLogProgress(chipTool, " ***** Test Step 188 : Read attribute NULLABLE_BOOLEAN not null\n"); + err = TestReadAttributeNullableBooleanNotNull_188(); break; case 189: - ChipLogProgress(chipTool, " ***** Test Step 189 : Read attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestReadAttributeNullableBitmap8MaxValue_189(); + ChipLogProgress(chipTool, " ***** Test Step 189 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_189(); break; case 190: - ChipLogProgress(chipTool, " ***** Test Step 190 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap8InvalidValue_190(); + ChipLogProgress(chipTool, " ***** Test Step 190 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_190(); break; case 191: - ChipLogProgress(chipTool, " ***** Test Step 191 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); - err = TestReadAttributeNullableBitmap8UnchangedValue_191(); + ChipLogProgress(chipTool, " ***** Test Step 191 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_191(); break; case 192: - ChipLogProgress(chipTool, " ***** Test Step 192 : Write attribute NULLABLE_BITMAP8 null Value\n"); - err = TestWriteAttributeNullableBitmap8NullValue_192(); + ChipLogProgress(chipTool, " ***** Test Step 192 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_192(); break; case 193: - ChipLogProgress(chipTool, " ***** Test Step 193 : Read attribute NULLABLE_BITMAP8 null Value\n"); - err = TestReadAttributeNullableBitmap8NullValue_193(); + ChipLogProgress(chipTool, " ***** Test Step 193 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_193(); break; case 194: - ChipLogProgress(chipTool, " ***** Test Step 194 : Read attribute NULLABLE_BITMAP8 not 254 Value\n"); - err = TestReadAttributeNullableBitmap8Not254Value_194(); + ChipLogProgress(chipTool, " ***** Test Step 194 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_194(); break; case 195: - ChipLogProgress(chipTool, " ***** Test Step 195 : Write attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestWriteAttributeNullableBitmap16MaxValue_195(); + ChipLogProgress(chipTool, " ***** Test Step 195 : Read attribute NULLABLE_BITMAP8 not 254 Value\n"); + err = TestReadAttributeNullableBitmap8Not254Value_195(); break; case 196: - ChipLogProgress(chipTool, " ***** Test Step 196 : Read attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestReadAttributeNullableBitmap16MaxValue_196(); + ChipLogProgress(chipTool, " ***** Test Step 196 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_196(); break; case 197: - ChipLogProgress(chipTool, " ***** Test Step 197 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap16InvalidValue_197(); + ChipLogProgress(chipTool, " ***** Test Step 197 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_197(); break; case 198: - ChipLogProgress(chipTool, " ***** Test Step 198 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); - err = TestReadAttributeNullableBitmap16UnchangedValue_198(); + ChipLogProgress(chipTool, " ***** Test Step 198 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_198(); break; case 199: - ChipLogProgress(chipTool, " ***** Test Step 199 : Write attribute NULLABLE_BITMAP16 null Value\n"); - err = TestWriteAttributeNullableBitmap16NullValue_199(); + ChipLogProgress(chipTool, " ***** Test Step 199 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_199(); break; case 200: - ChipLogProgress(chipTool, " ***** Test Step 200 : Read attribute NULLABLE_BITMAP16 null Value\n"); - err = TestReadAttributeNullableBitmap16NullValue_200(); + ChipLogProgress(chipTool, " ***** Test Step 200 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_200(); break; case 201: - ChipLogProgress(chipTool, " ***** Test Step 201 : Write attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestWriteAttributeNullableBitmap32MaxValue_201(); + ChipLogProgress(chipTool, " ***** Test Step 201 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_201(); break; case 202: - ChipLogProgress(chipTool, " ***** Test Step 202 : Read attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestReadAttributeNullableBitmap32MaxValue_202(); + ChipLogProgress(chipTool, " ***** Test Step 202 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_202(); break; case 203: - ChipLogProgress(chipTool, " ***** Test Step 203 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap32InvalidValue_203(); + ChipLogProgress(chipTool, " ***** Test Step 203 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_203(); break; case 204: - ChipLogProgress(chipTool, " ***** Test Step 204 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); - err = TestReadAttributeNullableBitmap32UnchangedValue_204(); + ChipLogProgress(chipTool, " ***** Test Step 204 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_204(); break; case 205: - ChipLogProgress(chipTool, " ***** Test Step 205 : Write attribute NULLABLE_BITMAP32 null Value\n"); - err = TestWriteAttributeNullableBitmap32NullValue_205(); + ChipLogProgress(chipTool, " ***** Test Step 205 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_205(); break; case 206: - ChipLogProgress(chipTool, " ***** Test Step 206 : Read attribute NULLABLE_BITMAP32 null Value\n"); - err = TestReadAttributeNullableBitmap32NullValue_206(); + ChipLogProgress(chipTool, " ***** Test Step 206 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_206(); break; case 207: - ChipLogProgress(chipTool, " ***** Test Step 207 : Write attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestWriteAttributeNullableBitmap64MaxValue_207(); + ChipLogProgress(chipTool, " ***** Test Step 207 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_207(); break; case 208: - ChipLogProgress(chipTool, " ***** Test Step 208 : Read attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestReadAttributeNullableBitmap64MaxValue_208(); + ChipLogProgress(chipTool, " ***** Test Step 208 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_208(); break; case 209: - ChipLogProgress(chipTool, " ***** Test Step 209 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap64InvalidValue_209(); + ChipLogProgress(chipTool, " ***** Test Step 209 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_209(); break; case 210: - ChipLogProgress(chipTool, " ***** Test Step 210 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); - err = TestReadAttributeNullableBitmap64UnchangedValue_210(); + ChipLogProgress(chipTool, " ***** Test Step 210 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_210(); break; case 211: - ChipLogProgress(chipTool, " ***** Test Step 211 : Write attribute NULLABLE_BITMAP64 null Value\n"); - err = TestWriteAttributeNullableBitmap64NullValue_211(); + ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_211(); break; case 212: - ChipLogProgress(chipTool, " ***** Test Step 212 : Read attribute NULLABLE_BITMAP64 null Value\n"); - err = TestReadAttributeNullableBitmap64NullValue_212(); + ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_212(); break; case 213: - ChipLogProgress(chipTool, " ***** Test Step 213 : Write attribute NULLABLE_INT8U Min Value\n"); - err = TestWriteAttributeNullableInt8uMinValue_213(); + ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_213(); break; case 214: - ChipLogProgress(chipTool, " ***** Test Step 214 : Read attribute NULLABLE_INT8U Min Value\n"); - err = TestReadAttributeNullableInt8uMinValue_214(); + ChipLogProgress(chipTool, " ***** Test Step 214 : Write attribute NULLABLE_INT8U Min Value\n"); + err = TestWriteAttributeNullableInt8uMinValue_214(); break; case 215: - ChipLogProgress(chipTool, " ***** Test Step 215 : Write attribute NULLABLE_INT8U Max Value\n"); - err = TestWriteAttributeNullableInt8uMaxValue_215(); + ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT8U Min Value\n"); + err = TestReadAttributeNullableInt8uMinValue_215(); break; case 216: - ChipLogProgress(chipTool, " ***** Test Step 216 : Read attribute NULLABLE_INT8U Max Value\n"); - err = TestReadAttributeNullableInt8uMaxValue_216(); + ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_216(); break; case 217: - ChipLogProgress(chipTool, " ***** Test Step 217 : Write attribute NULLABLE_INT8U Invalid Value\n"); - err = TestWriteAttributeNullableInt8uInvalidValue_217(); + ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_217(); break; case 218: - ChipLogProgress(chipTool, " ***** Test Step 218 : Read attribute NULLABLE_INT8U unchanged Value\n"); - err = TestReadAttributeNullableInt8uUnchangedValue_218(); + ChipLogProgress(chipTool, " ***** Test Step 218 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_218(); break; case 219: - ChipLogProgress(chipTool, " ***** Test Step 219 : Read attribute NULLABLE_INT8U unchanged Value with constraint\n"); - err = TestReadAttributeNullableInt8uUnchangedValueWithConstraint_219(); + ChipLogProgress(chipTool, " ***** Test Step 219 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_219(); break; case 220: - ChipLogProgress(chipTool, " ***** Test Step 220 : Write attribute NULLABLE_INT8U null Value\n"); - err = TestWriteAttributeNullableInt8uNullValue_220(); + ChipLogProgress(chipTool, " ***** Test Step 220 : Read attribute NULLABLE_INT8U unchanged Value with constraint\n"); + err = TestReadAttributeNullableInt8uUnchangedValueWithConstraint_220(); break; case 221: - ChipLogProgress(chipTool, " ***** Test Step 221 : Read attribute NULLABLE_INT8U null Value\n"); - err = TestReadAttributeNullableInt8uNullValue_221(); + ChipLogProgress(chipTool, " ***** Test Step 221 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_221(); break; case 222: - ChipLogProgress(chipTool, " ***** Test Step 222 : Read attribute NULLABLE_INT8U null Value & range\n"); - err = TestReadAttributeNullableInt8uNullValueRange_222(); + ChipLogProgress(chipTool, " ***** Test Step 222 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_222(); break; case 223: - ChipLogProgress(chipTool, " ***** Test Step 223 : Read attribute NULLABLE_INT8U null Value & not\n"); - err = TestReadAttributeNullableInt8uNullValueNot_223(); + ChipLogProgress(chipTool, " ***** Test Step 223 : Read attribute NULLABLE_INT8U null Value & range\n"); + err = TestReadAttributeNullableInt8uNullValueRange_223(); break; case 224: - ChipLogProgress(chipTool, " ***** Test Step 224 : Write attribute NULLABLE_INT8U Value\n"); - err = TestWriteAttributeNullableInt8uValue_224(); + ChipLogProgress(chipTool, " ***** Test Step 224 : Read attribute NULLABLE_INT8U null Value & not\n"); + err = TestReadAttributeNullableInt8uNullValueNot_224(); break; case 225: - ChipLogProgress(chipTool, " ***** Test Step 225 : Read attribute NULLABLE_INT8U Value in range\n"); - err = TestReadAttributeNullableInt8uValueInRange_225(); + ChipLogProgress(chipTool, " ***** Test Step 225 : Write attribute NULLABLE_INT8U Value\n"); + err = TestWriteAttributeNullableInt8uValue_225(); break; case 226: - ChipLogProgress(chipTool, " ***** Test Step 226 : Read attribute NULLABLE_INT8U notValue OK\n"); - err = TestReadAttributeNullableInt8uNotValueOk_226(); + ChipLogProgress(chipTool, " ***** Test Step 226 : Read attribute NULLABLE_INT8U Value in range\n"); + err = TestReadAttributeNullableInt8uValueInRange_226(); break; case 227: - ChipLogProgress(chipTool, " ***** Test Step 227 : Write attribute NULLABLE_INT16U Min Value\n"); - err = TestWriteAttributeNullableInt16uMinValue_227(); + ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_INT8U notValue OK\n"); + err = TestReadAttributeNullableInt8uNotValueOk_227(); break; case 228: - ChipLogProgress(chipTool, " ***** Test Step 228 : Read attribute NULLABLE_INT16U Min Value\n"); - err = TestReadAttributeNullableInt16uMinValue_228(); + ChipLogProgress(chipTool, " ***** Test Step 228 : Write attribute NULLABLE_INT16U Min Value\n"); + err = TestWriteAttributeNullableInt16uMinValue_228(); break; case 229: - ChipLogProgress(chipTool, " ***** Test Step 229 : Write attribute NULLABLE_INT16U Max Value\n"); - err = TestWriteAttributeNullableInt16uMaxValue_229(); + ChipLogProgress(chipTool, " ***** Test Step 229 : Read attribute NULLABLE_INT16U Min Value\n"); + err = TestReadAttributeNullableInt16uMinValue_229(); break; case 230: - ChipLogProgress(chipTool, " ***** Test Step 230 : Read attribute NULLABLE_INT16U Max Value\n"); - err = TestReadAttributeNullableInt16uMaxValue_230(); + ChipLogProgress(chipTool, " ***** Test Step 230 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_230(); break; case 231: - ChipLogProgress(chipTool, " ***** Test Step 231 : Write attribute NULLABLE_INT16U Invalid Value\n"); - err = TestWriteAttributeNullableInt16uInvalidValue_231(); + ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_231(); break; case 232: - ChipLogProgress(chipTool, " ***** Test Step 232 : Read attribute NULLABLE_INT16U unchanged Value\n"); - err = TestReadAttributeNullableInt16uUnchangedValue_232(); + ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_232(); break; case 233: - ChipLogProgress(chipTool, " ***** Test Step 233 : Write attribute NULLABLE_INT16U null Value\n"); - err = TestWriteAttributeNullableInt16uNullValue_233(); + ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_233(); break; case 234: - ChipLogProgress(chipTool, " ***** Test Step 234 : Read attribute NULLABLE_INT16U null Value\n"); - err = TestReadAttributeNullableInt16uNullValue_234(); + ChipLogProgress(chipTool, " ***** Test Step 234 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_234(); break; case 235: - ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_INT16U null Value & range\n"); - err = TestReadAttributeNullableInt16uNullValueRange_235(); + ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_235(); break; case 236: - ChipLogProgress(chipTool, " ***** Test Step 236 : Read attribute NULLABLE_INT16U null Value & not\n"); - err = TestReadAttributeNullableInt16uNullValueNot_236(); + ChipLogProgress(chipTool, " ***** Test Step 236 : Read attribute NULLABLE_INT16U null Value & range\n"); + err = TestReadAttributeNullableInt16uNullValueRange_236(); break; case 237: - ChipLogProgress(chipTool, " ***** Test Step 237 : Write attribute NULLABLE_INT16U Value\n"); - err = TestWriteAttributeNullableInt16uValue_237(); + ChipLogProgress(chipTool, " ***** Test Step 237 : Read attribute NULLABLE_INT16U null Value & not\n"); + err = TestReadAttributeNullableInt16uNullValueNot_237(); break; case 238: - ChipLogProgress(chipTool, " ***** Test Step 238 : Read attribute NULLABLE_INT16U Value in range\n"); - err = TestReadAttributeNullableInt16uValueInRange_238(); + ChipLogProgress(chipTool, " ***** Test Step 238 : Write attribute NULLABLE_INT16U Value\n"); + err = TestWriteAttributeNullableInt16uValue_238(); break; case 239: - ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_INT16U notValue OK\n"); - err = TestReadAttributeNullableInt16uNotValueOk_239(); + ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_INT16U Value in range\n"); + err = TestReadAttributeNullableInt16uValueInRange_239(); break; case 240: - ChipLogProgress(chipTool, " ***** Test Step 240 : Write attribute NULLABLE_INT32U Min Value\n"); - err = TestWriteAttributeNullableInt32uMinValue_240(); + ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_INT16U notValue OK\n"); + err = TestReadAttributeNullableInt16uNotValueOk_240(); break; case 241: - ChipLogProgress(chipTool, " ***** Test Step 241 : Read attribute NULLABLE_INT32U Min Value\n"); - err = TestReadAttributeNullableInt32uMinValue_241(); + ChipLogProgress(chipTool, " ***** Test Step 241 : Write attribute NULLABLE_INT32U Min Value\n"); + err = TestWriteAttributeNullableInt32uMinValue_241(); break; case 242: - ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_INT32U Max Value\n"); - err = TestWriteAttributeNullableInt32uMaxValue_242(); + ChipLogProgress(chipTool, " ***** Test Step 242 : Read attribute NULLABLE_INT32U Min Value\n"); + err = TestReadAttributeNullableInt32uMinValue_242(); break; case 243: - ChipLogProgress(chipTool, " ***** Test Step 243 : Read attribute NULLABLE_INT32U Max Value\n"); - err = TestReadAttributeNullableInt32uMaxValue_243(); + ChipLogProgress(chipTool, " ***** Test Step 243 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_243(); break; case 244: - ChipLogProgress(chipTool, " ***** Test Step 244 : Write attribute NULLABLE_INT32U Invalid Value\n"); - err = TestWriteAttributeNullableInt32uInvalidValue_244(); + ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_244(); break; case 245: - ChipLogProgress(chipTool, " ***** Test Step 245 : Read attribute NULLABLE_INT32U unchanged Value\n"); - err = TestReadAttributeNullableInt32uUnchangedValue_245(); + ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_245(); break; case 246: - ChipLogProgress(chipTool, " ***** Test Step 246 : Write attribute NULLABLE_INT32U null Value\n"); - err = TestWriteAttributeNullableInt32uNullValue_246(); + ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_246(); break; case 247: - ChipLogProgress(chipTool, " ***** Test Step 247 : Read attribute NULLABLE_INT32U null Value\n"); - err = TestReadAttributeNullableInt32uNullValue_247(); + ChipLogProgress(chipTool, " ***** Test Step 247 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_247(); break; case 248: - ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute NULLABLE_INT32U null Value & range\n"); - err = TestReadAttributeNullableInt32uNullValueRange_248(); + ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_248(); break; case 249: - ChipLogProgress(chipTool, " ***** Test Step 249 : Read attribute NULLABLE_INT32U null Value & not\n"); - err = TestReadAttributeNullableInt32uNullValueNot_249(); + ChipLogProgress(chipTool, " ***** Test Step 249 : Read attribute NULLABLE_INT32U null Value & range\n"); + err = TestReadAttributeNullableInt32uNullValueRange_249(); break; case 250: - ChipLogProgress(chipTool, " ***** Test Step 250 : Write attribute NULLABLE_INT32U Value\n"); - err = TestWriteAttributeNullableInt32uValue_250(); + ChipLogProgress(chipTool, " ***** Test Step 250 : Read attribute NULLABLE_INT32U null Value & not\n"); + err = TestReadAttributeNullableInt32uNullValueNot_250(); break; case 251: - ChipLogProgress(chipTool, " ***** Test Step 251 : Read attribute NULLABLE_INT32U Value in range\n"); - err = TestReadAttributeNullableInt32uValueInRange_251(); + ChipLogProgress(chipTool, " ***** Test Step 251 : Write attribute NULLABLE_INT32U Value\n"); + err = TestWriteAttributeNullableInt32uValue_251(); break; case 252: - ChipLogProgress(chipTool, " ***** Test Step 252 : Read attribute NULLABLE_INT32U notValue OK\n"); - err = TestReadAttributeNullableInt32uNotValueOk_252(); + ChipLogProgress(chipTool, " ***** Test Step 252 : Read attribute NULLABLE_INT32U Value in range\n"); + err = TestReadAttributeNullableInt32uValueInRange_252(); break; case 253: - ChipLogProgress(chipTool, " ***** Test Step 253 : Write attribute NULLABLE_INT64U Min Value\n"); - err = TestWriteAttributeNullableInt64uMinValue_253(); + ChipLogProgress(chipTool, " ***** Test Step 253 : Read attribute NULLABLE_INT32U notValue OK\n"); + err = TestReadAttributeNullableInt32uNotValueOk_253(); break; case 254: - ChipLogProgress(chipTool, " ***** Test Step 254 : Read attribute NULLABLE_INT64U Min Value\n"); - err = TestReadAttributeNullableInt64uMinValue_254(); + ChipLogProgress(chipTool, " ***** Test Step 254 : Write attribute NULLABLE_INT64U Min Value\n"); + err = TestWriteAttributeNullableInt64uMinValue_254(); break; case 255: - ChipLogProgress(chipTool, " ***** Test Step 255 : Write attribute NULLABLE_INT64U Max Value\n"); - err = TestWriteAttributeNullableInt64uMaxValue_255(); + ChipLogProgress(chipTool, " ***** Test Step 255 : Read attribute NULLABLE_INT64U Min Value\n"); + err = TestReadAttributeNullableInt64uMinValue_255(); break; case 256: - ChipLogProgress(chipTool, " ***** Test Step 256 : Read attribute NULLABLE_INT64U Max Value\n"); - err = TestReadAttributeNullableInt64uMaxValue_256(); + ChipLogProgress(chipTool, " ***** Test Step 256 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_256(); break; case 257: - ChipLogProgress(chipTool, " ***** Test Step 257 : Write attribute NULLABLE_INT64U Invalid Value\n"); - err = TestWriteAttributeNullableInt64uInvalidValue_257(); + ChipLogProgress(chipTool, " ***** Test Step 257 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_257(); break; case 258: - ChipLogProgress(chipTool, " ***** Test Step 258 : Read attribute NULLABLE_INT64U unchanged Value\n"); - err = TestReadAttributeNullableInt64uUnchangedValue_258(); + ChipLogProgress(chipTool, " ***** Test Step 258 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_258(); break; case 259: - ChipLogProgress(chipTool, " ***** Test Step 259 : Write attribute NULLABLE_INT64U null Value\n"); - err = TestWriteAttributeNullableInt64uNullValue_259(); + ChipLogProgress(chipTool, " ***** Test Step 259 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_259(); break; case 260: - ChipLogProgress(chipTool, " ***** Test Step 260 : Read attribute NULLABLE_INT64U null Value\n"); - err = TestReadAttributeNullableInt64uNullValue_260(); + ChipLogProgress(chipTool, " ***** Test Step 260 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_260(); break; case 261: - ChipLogProgress(chipTool, " ***** Test Step 261 : Read attribute NULLABLE_INT64U null Value & range\n"); - err = TestReadAttributeNullableInt64uNullValueRange_261(); + ChipLogProgress(chipTool, " ***** Test Step 261 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_261(); break; case 262: - ChipLogProgress(chipTool, " ***** Test Step 262 : Read attribute NULLABLE_INT64U null Value & not\n"); - err = TestReadAttributeNullableInt64uNullValueNot_262(); + ChipLogProgress(chipTool, " ***** Test Step 262 : Read attribute NULLABLE_INT64U null Value & range\n"); + err = TestReadAttributeNullableInt64uNullValueRange_262(); break; case 263: - ChipLogProgress(chipTool, " ***** Test Step 263 : Write attribute NULLABLE_INT64U Value\n"); - err = TestWriteAttributeNullableInt64uValue_263(); + ChipLogProgress(chipTool, " ***** Test Step 263 : Read attribute NULLABLE_INT64U null Value & not\n"); + err = TestReadAttributeNullableInt64uNullValueNot_263(); break; case 264: - ChipLogProgress(chipTool, " ***** Test Step 264 : Read attribute NULLABLE_INT64U Value in range\n"); - err = TestReadAttributeNullableInt64uValueInRange_264(); + ChipLogProgress(chipTool, " ***** Test Step 264 : Write attribute NULLABLE_INT64U Value\n"); + err = TestWriteAttributeNullableInt64uValue_264(); break; case 265: - ChipLogProgress(chipTool, " ***** Test Step 265 : Read attribute NULLABLE_INT64U notValue OK\n"); - err = TestReadAttributeNullableInt64uNotValueOk_265(); + ChipLogProgress(chipTool, " ***** Test Step 265 : Read attribute NULLABLE_INT64U Value in range\n"); + err = TestReadAttributeNullableInt64uValueInRange_265(); break; case 266: - ChipLogProgress(chipTool, " ***** Test Step 266 : Write attribute NULLABLE_INT8S Min Value\n"); - err = TestWriteAttributeNullableInt8sMinValue_266(); + ChipLogProgress(chipTool, " ***** Test Step 266 : Read attribute NULLABLE_INT64U notValue OK\n"); + err = TestReadAttributeNullableInt64uNotValueOk_266(); break; case 267: - ChipLogProgress(chipTool, " ***** Test Step 267 : Read attribute NULLABLE_INT8S Min Value\n"); - err = TestReadAttributeNullableInt8sMinValue_267(); + ChipLogProgress(chipTool, " ***** Test Step 267 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_267(); break; case 268: - ChipLogProgress(chipTool, " ***** Test Step 268 : Write attribute NULLABLE_INT8S Invalid Value\n"); - err = TestWriteAttributeNullableInt8sInvalidValue_268(); + ChipLogProgress(chipTool, " ***** Test Step 268 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_268(); break; case 269: - ChipLogProgress(chipTool, " ***** Test Step 269 : Read attribute NULLABLE_INT8S unchanged Value\n"); - err = TestReadAttributeNullableInt8sUnchangedValue_269(); + ChipLogProgress(chipTool, " ***** Test Step 269 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_269(); break; case 270: - ChipLogProgress(chipTool, " ***** Test Step 270 : Write attribute NULLABLE_INT8S null Value\n"); - err = TestWriteAttributeNullableInt8sNullValue_270(); + ChipLogProgress(chipTool, " ***** Test Step 270 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_270(); break; case 271: - ChipLogProgress(chipTool, " ***** Test Step 271 : Read attribute NULLABLE_INT8S null Value\n"); - err = TestReadAttributeNullableInt8sNullValue_271(); + ChipLogProgress(chipTool, " ***** Test Step 271 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_271(); break; case 272: - ChipLogProgress(chipTool, " ***** Test Step 272 : Read attribute NULLABLE_INT8S null Value & range\n"); - err = TestReadAttributeNullableInt8sNullValueRange_272(); + ChipLogProgress(chipTool, " ***** Test Step 272 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_272(); break; case 273: - ChipLogProgress(chipTool, " ***** Test Step 273 : Read attribute NULLABLE_INT8S null Value & not\n"); - err = TestReadAttributeNullableInt8sNullValueNot_273(); + ChipLogProgress(chipTool, " ***** Test Step 273 : Read attribute NULLABLE_INT8S null Value & range\n"); + err = TestReadAttributeNullableInt8sNullValueRange_273(); break; case 274: - ChipLogProgress(chipTool, " ***** Test Step 274 : Write attribute NULLABLE_INT8S Value\n"); - err = TestWriteAttributeNullableInt8sValue_274(); + ChipLogProgress(chipTool, " ***** Test Step 274 : Read attribute NULLABLE_INT8S null Value & not\n"); + err = TestReadAttributeNullableInt8sNullValueNot_274(); break; case 275: - ChipLogProgress(chipTool, " ***** Test Step 275 : Read attribute NULLABLE_INT8S Value in range\n"); - err = TestReadAttributeNullableInt8sValueInRange_275(); + ChipLogProgress(chipTool, " ***** Test Step 275 : Write attribute NULLABLE_INT8S Value\n"); + err = TestWriteAttributeNullableInt8sValue_275(); break; case 276: - ChipLogProgress(chipTool, " ***** Test Step 276 : Read attribute NULLABLE_INT8S notValue OK\n"); - err = TestReadAttributeNullableInt8sNotValueOk_276(); + ChipLogProgress(chipTool, " ***** Test Step 276 : Read attribute NULLABLE_INT8S Value in range\n"); + err = TestReadAttributeNullableInt8sValueInRange_276(); break; case 277: - ChipLogProgress(chipTool, " ***** Test Step 277 : Write attribute NULLABLE_INT16S Min Value\n"); - err = TestWriteAttributeNullableInt16sMinValue_277(); + ChipLogProgress(chipTool, " ***** Test Step 277 : Read attribute NULLABLE_INT8S notValue OK\n"); + err = TestReadAttributeNullableInt8sNotValueOk_277(); break; case 278: - ChipLogProgress(chipTool, " ***** Test Step 278 : Read attribute NULLABLE_INT16S Min Value\n"); - err = TestReadAttributeNullableInt16sMinValue_278(); + ChipLogProgress(chipTool, " ***** Test Step 278 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_278(); break; case 279: - ChipLogProgress(chipTool, " ***** Test Step 279 : Write attribute NULLABLE_INT16S Invalid Value\n"); - err = TestWriteAttributeNullableInt16sInvalidValue_279(); + ChipLogProgress(chipTool, " ***** Test Step 279 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_279(); break; case 280: - ChipLogProgress(chipTool, " ***** Test Step 280 : Read attribute NULLABLE_INT16S unchanged Value\n"); - err = TestReadAttributeNullableInt16sUnchangedValue_280(); + ChipLogProgress(chipTool, " ***** Test Step 280 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_280(); break; case 281: - ChipLogProgress(chipTool, " ***** Test Step 281 : Write attribute NULLABLE_INT16S null Value\n"); - err = TestWriteAttributeNullableInt16sNullValue_281(); + ChipLogProgress(chipTool, " ***** Test Step 281 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_281(); break; case 282: - ChipLogProgress(chipTool, " ***** Test Step 282 : Read attribute NULLABLE_INT16S null Value\n"); - err = TestReadAttributeNullableInt16sNullValue_282(); + ChipLogProgress(chipTool, " ***** Test Step 282 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_282(); break; case 283: - ChipLogProgress(chipTool, " ***** Test Step 283 : Read attribute NULLABLE_INT16S null Value & range\n"); - err = TestReadAttributeNullableInt16sNullValueRange_283(); + ChipLogProgress(chipTool, " ***** Test Step 283 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_283(); break; case 284: - ChipLogProgress(chipTool, " ***** Test Step 284 : Read attribute NULLABLE_INT16S null Value & not\n"); - err = TestReadAttributeNullableInt16sNullValueNot_284(); + ChipLogProgress(chipTool, " ***** Test Step 284 : Read attribute NULLABLE_INT16S null Value & range\n"); + err = TestReadAttributeNullableInt16sNullValueRange_284(); break; case 285: - ChipLogProgress(chipTool, " ***** Test Step 285 : Write attribute NULLABLE_INT16S Value\n"); - err = TestWriteAttributeNullableInt16sValue_285(); + ChipLogProgress(chipTool, " ***** Test Step 285 : Read attribute NULLABLE_INT16S null Value & not\n"); + err = TestReadAttributeNullableInt16sNullValueNot_285(); break; case 286: - ChipLogProgress(chipTool, " ***** Test Step 286 : Read attribute NULLABLE_INT16S Value in range\n"); - err = TestReadAttributeNullableInt16sValueInRange_286(); + ChipLogProgress(chipTool, " ***** Test Step 286 : Write attribute NULLABLE_INT16S Value\n"); + err = TestWriteAttributeNullableInt16sValue_286(); break; case 287: - ChipLogProgress(chipTool, " ***** Test Step 287 : Read attribute NULLABLE_INT16S notValue OK\n"); - err = TestReadAttributeNullableInt16sNotValueOk_287(); + ChipLogProgress(chipTool, " ***** Test Step 287 : Read attribute NULLABLE_INT16S Value in range\n"); + err = TestReadAttributeNullableInt16sValueInRange_287(); break; case 288: - ChipLogProgress(chipTool, " ***** Test Step 288 : Write attribute NULLABLE_INT32S Min Value\n"); - err = TestWriteAttributeNullableInt32sMinValue_288(); + ChipLogProgress(chipTool, " ***** Test Step 288 : Read attribute NULLABLE_INT16S notValue OK\n"); + err = TestReadAttributeNullableInt16sNotValueOk_288(); break; case 289: - ChipLogProgress(chipTool, " ***** Test Step 289 : Read attribute NULLABLE_INT32S Min Value\n"); - err = TestReadAttributeNullableInt32sMinValue_289(); + ChipLogProgress(chipTool, " ***** Test Step 289 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_289(); break; case 290: - ChipLogProgress(chipTool, " ***** Test Step 290 : Write attribute NULLABLE_INT32S Invalid Value\n"); - err = TestWriteAttributeNullableInt32sInvalidValue_290(); + ChipLogProgress(chipTool, " ***** Test Step 290 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_290(); break; case 291: - ChipLogProgress(chipTool, " ***** Test Step 291 : Read attribute NULLABLE_INT32S unchanged Value\n"); - err = TestReadAttributeNullableInt32sUnchangedValue_291(); + ChipLogProgress(chipTool, " ***** Test Step 291 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_291(); break; case 292: - ChipLogProgress(chipTool, " ***** Test Step 292 : Write attribute NULLABLE_INT32S null Value\n"); - err = TestWriteAttributeNullableInt32sNullValue_292(); + ChipLogProgress(chipTool, " ***** Test Step 292 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_292(); break; case 293: - ChipLogProgress(chipTool, " ***** Test Step 293 : Read attribute NULLABLE_INT32S null Value\n"); - err = TestReadAttributeNullableInt32sNullValue_293(); + ChipLogProgress(chipTool, " ***** Test Step 293 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_293(); break; case 294: - ChipLogProgress(chipTool, " ***** Test Step 294 : Read attribute NULLABLE_INT32S null Value & range\n"); - err = TestReadAttributeNullableInt32sNullValueRange_294(); + ChipLogProgress(chipTool, " ***** Test Step 294 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_294(); break; case 295: - ChipLogProgress(chipTool, " ***** Test Step 295 : Read attribute NULLABLE_INT32S null Value & not\n"); - err = TestReadAttributeNullableInt32sNullValueNot_295(); + ChipLogProgress(chipTool, " ***** Test Step 295 : Read attribute NULLABLE_INT32S null Value & range\n"); + err = TestReadAttributeNullableInt32sNullValueRange_295(); break; case 296: - ChipLogProgress(chipTool, " ***** Test Step 296 : Write attribute NULLABLE_INT32S Value\n"); - err = TestWriteAttributeNullableInt32sValue_296(); + ChipLogProgress(chipTool, " ***** Test Step 296 : Read attribute NULLABLE_INT32S null Value & not\n"); + err = TestReadAttributeNullableInt32sNullValueNot_296(); break; case 297: - ChipLogProgress(chipTool, " ***** Test Step 297 : Read attribute NULLABLE_INT32S Value in range\n"); - err = TestReadAttributeNullableInt32sValueInRange_297(); + ChipLogProgress(chipTool, " ***** Test Step 297 : Write attribute NULLABLE_INT32S Value\n"); + err = TestWriteAttributeNullableInt32sValue_297(); break; case 298: - ChipLogProgress(chipTool, " ***** Test Step 298 : Read attribute NULLABLE_INT32S notValue OK\n"); - err = TestReadAttributeNullableInt32sNotValueOk_298(); + ChipLogProgress(chipTool, " ***** Test Step 298 : Read attribute NULLABLE_INT32S Value in range\n"); + err = TestReadAttributeNullableInt32sValueInRange_298(); break; case 299: - ChipLogProgress(chipTool, " ***** Test Step 299 : Write attribute NULLABLE_INT64S Min Value\n"); - err = TestWriteAttributeNullableInt64sMinValue_299(); + ChipLogProgress(chipTool, " ***** Test Step 299 : Read attribute NULLABLE_INT32S notValue OK\n"); + err = TestReadAttributeNullableInt32sNotValueOk_299(); break; case 300: - ChipLogProgress(chipTool, " ***** Test Step 300 : Read attribute NULLABLE_INT64S Min Value\n"); - err = TestReadAttributeNullableInt64sMinValue_300(); + ChipLogProgress(chipTool, " ***** Test Step 300 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_300(); break; case 301: - ChipLogProgress(chipTool, " ***** Test Step 301 : Write attribute NULLABLE_INT64S Invalid Value\n"); - err = TestWriteAttributeNullableInt64sInvalidValue_301(); + ChipLogProgress(chipTool, " ***** Test Step 301 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_301(); break; case 302: - ChipLogProgress(chipTool, " ***** Test Step 302 : Read attribute NULLABLE_INT64S unchanged Value\n"); - err = TestReadAttributeNullableInt64sUnchangedValue_302(); + ChipLogProgress(chipTool, " ***** Test Step 302 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_302(); break; case 303: - ChipLogProgress(chipTool, " ***** Test Step 303 : Write attribute NULLABLE_INT64S null Value\n"); - err = TestWriteAttributeNullableInt64sNullValue_303(); + ChipLogProgress(chipTool, " ***** Test Step 303 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_303(); break; case 304: - ChipLogProgress(chipTool, " ***** Test Step 304 : Read attribute NULLABLE_INT64S null Value\n"); - err = TestReadAttributeNullableInt64sNullValue_304(); + ChipLogProgress(chipTool, " ***** Test Step 304 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_304(); break; case 305: - ChipLogProgress(chipTool, " ***** Test Step 305 : Read attribute NULLABLE_INT64S null Value & range\n"); - err = TestReadAttributeNullableInt64sNullValueRange_305(); + ChipLogProgress(chipTool, " ***** Test Step 305 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_305(); break; case 306: - ChipLogProgress(chipTool, " ***** Test Step 306 : Read attribute NULLABLE_INT64S null Value & not\n"); - err = TestReadAttributeNullableInt64sNullValueNot_306(); + ChipLogProgress(chipTool, " ***** Test Step 306 : Read attribute NULLABLE_INT64S null Value & range\n"); + err = TestReadAttributeNullableInt64sNullValueRange_306(); break; case 307: - ChipLogProgress(chipTool, " ***** Test Step 307 : Write attribute NULLABLE_INT64S Value\n"); - err = TestWriteAttributeNullableInt64sValue_307(); + ChipLogProgress(chipTool, " ***** Test Step 307 : Read attribute NULLABLE_INT64S null Value & not\n"); + err = TestReadAttributeNullableInt64sNullValueNot_307(); break; case 308: - ChipLogProgress(chipTool, " ***** Test Step 308 : Read attribute NULLABLE_INT64S Value in range\n"); - err = TestReadAttributeNullableInt64sValueInRange_308(); + ChipLogProgress(chipTool, " ***** Test Step 308 : Write attribute NULLABLE_INT64S Value\n"); + err = TestWriteAttributeNullableInt64sValue_308(); break; case 309: - ChipLogProgress(chipTool, " ***** Test Step 309 : Read attribute NULLABLE_INT64S notValue OK\n"); - err = TestReadAttributeNullableInt64sNotValueOk_309(); + ChipLogProgress(chipTool, " ***** Test Step 309 : Read attribute NULLABLE_INT64S Value in range\n"); + err = TestReadAttributeNullableInt64sValueInRange_309(); break; case 310: - ChipLogProgress(chipTool, " ***** Test Step 310 : Write attribute NULLABLE_SINGLE medium Value\n"); - err = TestWriteAttributeNullableSingleMediumValue_310(); + ChipLogProgress(chipTool, " ***** Test Step 310 : Read attribute NULLABLE_INT64S notValue OK\n"); + err = TestReadAttributeNullableInt64sNotValueOk_310(); break; case 311: - ChipLogProgress(chipTool, " ***** Test Step 311 : Read attribute NULLABLE_SINGLE medium Value\n"); - err = TestReadAttributeNullableSingleMediumValue_311(); + ChipLogProgress(chipTool, " ***** Test Step 311 : Write attribute NULLABLE_SINGLE medium Value\n"); + err = TestWriteAttributeNullableSingleMediumValue_311(); break; case 312: - ChipLogProgress(chipTool, " ***** Test Step 312 : Write attribute NULLABLE_SINGLE largest Value\n"); - err = TestWriteAttributeNullableSingleLargestValue_312(); + ChipLogProgress(chipTool, " ***** Test Step 312 : Read attribute NULLABLE_SINGLE medium Value\n"); + err = TestReadAttributeNullableSingleMediumValue_312(); break; case 313: - ChipLogProgress(chipTool, " ***** Test Step 313 : Read attribute NULLABLE_SINGLE largest Value\n"); - err = TestReadAttributeNullableSingleLargestValue_313(); + ChipLogProgress(chipTool, " ***** Test Step 313 : Write attribute NULLABLE_SINGLE largest Value\n"); + err = TestWriteAttributeNullableSingleLargestValue_313(); break; case 314: - ChipLogProgress(chipTool, " ***** Test Step 314 : Write attribute NULLABLE_SINGLE smallest Value\n"); - err = TestWriteAttributeNullableSingleSmallestValue_314(); + ChipLogProgress(chipTool, " ***** Test Step 314 : Read attribute NULLABLE_SINGLE largest Value\n"); + err = TestReadAttributeNullableSingleLargestValue_314(); break; case 315: - ChipLogProgress(chipTool, " ***** Test Step 315 : Read attribute NULLABLE_SINGLE smallest Value\n"); - err = TestReadAttributeNullableSingleSmallestValue_315(); + ChipLogProgress(chipTool, " ***** Test Step 315 : Write attribute NULLABLE_SINGLE smallest Value\n"); + err = TestWriteAttributeNullableSingleSmallestValue_315(); break; case 316: - ChipLogProgress(chipTool, " ***** Test Step 316 : Write attribute NULLABLE_SINGLE null Value\n"); - err = TestWriteAttributeNullableSingleNullValue_316(); + ChipLogProgress(chipTool, " ***** Test Step 316 : Read attribute NULLABLE_SINGLE smallest Value\n"); + err = TestReadAttributeNullableSingleSmallestValue_316(); break; case 317: - ChipLogProgress(chipTool, " ***** Test Step 317 : Read attribute NULLABLE_SINGLE null Value\n"); - err = TestReadAttributeNullableSingleNullValue_317(); + ChipLogProgress(chipTool, " ***** Test Step 317 : Write attribute NULLABLE_SINGLE null Value\n"); + err = TestWriteAttributeNullableSingleNullValue_317(); break; case 318: - ChipLogProgress(chipTool, " ***** Test Step 318 : Write attribute NULLABLE_SINGLE 0 Value\n"); - err = TestWriteAttributeNullableSingle0Value_318(); + ChipLogProgress(chipTool, " ***** Test Step 318 : Read attribute NULLABLE_SINGLE null Value\n"); + err = TestReadAttributeNullableSingleNullValue_318(); break; case 319: - ChipLogProgress(chipTool, " ***** Test Step 319 : Read attribute NULLABLE_SINGLE 0 Value\n"); - err = TestReadAttributeNullableSingle0Value_319(); + ChipLogProgress(chipTool, " ***** Test Step 319 : Write attribute NULLABLE_SINGLE 0 Value\n"); + err = TestWriteAttributeNullableSingle0Value_319(); break; case 320: - ChipLogProgress(chipTool, " ***** Test Step 320 : Write attribute NULLABLE_DOUBLE medium Value\n"); - err = TestWriteAttributeNullableDoubleMediumValue_320(); + ChipLogProgress(chipTool, " ***** Test Step 320 : Read attribute NULLABLE_SINGLE 0 Value\n"); + err = TestReadAttributeNullableSingle0Value_320(); break; case 321: - ChipLogProgress(chipTool, " ***** Test Step 321 : Read attribute NULLABLE_DOUBLE medium Value\n"); - err = TestReadAttributeNullableDoubleMediumValue_321(); + ChipLogProgress(chipTool, " ***** Test Step 321 : Write attribute NULLABLE_DOUBLE medium Value\n"); + err = TestWriteAttributeNullableDoubleMediumValue_321(); break; case 322: - ChipLogProgress(chipTool, " ***** Test Step 322 : Write attribute NULLABLE_DOUBLE largest Value\n"); - err = TestWriteAttributeNullableDoubleLargestValue_322(); + ChipLogProgress(chipTool, " ***** Test Step 322 : Read attribute NULLABLE_DOUBLE medium Value\n"); + err = TestReadAttributeNullableDoubleMediumValue_322(); break; case 323: - ChipLogProgress(chipTool, " ***** Test Step 323 : Read attribute NULLABLE_DOUBLE largest Value\n"); - err = TestReadAttributeNullableDoubleLargestValue_323(); + ChipLogProgress(chipTool, " ***** Test Step 323 : Write attribute NULLABLE_DOUBLE largest Value\n"); + err = TestWriteAttributeNullableDoubleLargestValue_323(); break; case 324: - ChipLogProgress(chipTool, " ***** Test Step 324 : Write attribute NULLABLE_DOUBLE smallest Value\n"); - err = TestWriteAttributeNullableDoubleSmallestValue_324(); + ChipLogProgress(chipTool, " ***** Test Step 324 : Read attribute NULLABLE_DOUBLE largest Value\n"); + err = TestReadAttributeNullableDoubleLargestValue_324(); break; case 325: - ChipLogProgress(chipTool, " ***** Test Step 325 : Read attribute NULLABLE_DOUBLE smallest Value\n"); - err = TestReadAttributeNullableDoubleSmallestValue_325(); + ChipLogProgress(chipTool, " ***** Test Step 325 : Write attribute NULLABLE_DOUBLE smallest Value\n"); + err = TestWriteAttributeNullableDoubleSmallestValue_325(); break; case 326: - ChipLogProgress(chipTool, " ***** Test Step 326 : Write attribute NULLABLE_DOUBLE null Value\n"); - err = TestWriteAttributeNullableDoubleNullValue_326(); + ChipLogProgress(chipTool, " ***** Test Step 326 : Read attribute NULLABLE_DOUBLE smallest Value\n"); + err = TestReadAttributeNullableDoubleSmallestValue_326(); break; case 327: - ChipLogProgress(chipTool, " ***** Test Step 327 : Read attribute NULLABLE_DOUBLE null Value\n"); - err = TestReadAttributeNullableDoubleNullValue_327(); + ChipLogProgress(chipTool, " ***** Test Step 327 : Write attribute NULLABLE_DOUBLE null Value\n"); + err = TestWriteAttributeNullableDoubleNullValue_327(); break; case 328: - ChipLogProgress(chipTool, " ***** Test Step 328 : Write attribute NULLABLE_DOUBLE 0 Value\n"); - err = TestWriteAttributeNullableDouble0Value_328(); + ChipLogProgress(chipTool, " ***** Test Step 328 : Read attribute NULLABLE_DOUBLE null Value\n"); + err = TestReadAttributeNullableDoubleNullValue_328(); break; case 329: - ChipLogProgress(chipTool, " ***** Test Step 329 : Read attribute NULLABLE_DOUBLE 0 Value\n"); - err = TestReadAttributeNullableDouble0Value_329(); + ChipLogProgress(chipTool, " ***** Test Step 329 : Write attribute NULLABLE_DOUBLE 0 Value\n"); + err = TestWriteAttributeNullableDouble0Value_329(); break; case 330: - ChipLogProgress(chipTool, " ***** Test Step 330 : Write attribute NULLABLE_ENUM8 Min Value\n"); - err = TestWriteAttributeNullableEnum8MinValue_330(); + ChipLogProgress(chipTool, " ***** Test Step 330 : Read attribute NULLABLE_DOUBLE 0 Value\n"); + err = TestReadAttributeNullableDouble0Value_330(); break; case 331: - ChipLogProgress(chipTool, " ***** Test Step 331 : Read attribute NULLABLE_ENUM8 Min Value\n"); - err = TestReadAttributeNullableEnum8MinValue_331(); + ChipLogProgress(chipTool, " ***** Test Step 331 : Write attribute NULLABLE_ENUM8 Min Value\n"); + err = TestWriteAttributeNullableEnum8MinValue_331(); break; case 332: - ChipLogProgress(chipTool, " ***** Test Step 332 : Write attribute NULLABLE_ENUM8 Max Value\n"); - err = TestWriteAttributeNullableEnum8MaxValue_332(); + ChipLogProgress(chipTool, " ***** Test Step 332 : Read attribute NULLABLE_ENUM8 Min Value\n"); + err = TestReadAttributeNullableEnum8MinValue_332(); break; case 333: - ChipLogProgress(chipTool, " ***** Test Step 333 : Read attribute NULLABLE_ENUM8 Max Value\n"); - err = TestReadAttributeNullableEnum8MaxValue_333(); + ChipLogProgress(chipTool, " ***** Test Step 333 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_333(); break; case 334: - ChipLogProgress(chipTool, " ***** Test Step 334 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); - err = TestWriteAttributeNullableEnum8InvalidValue_334(); + ChipLogProgress(chipTool, " ***** Test Step 334 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_334(); break; case 335: - ChipLogProgress(chipTool, " ***** Test Step 335 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); - err = TestReadAttributeNullableEnum8UnchangedValue_335(); + ChipLogProgress(chipTool, " ***** Test Step 335 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_335(); break; case 336: - ChipLogProgress(chipTool, " ***** Test Step 336 : Write attribute NULLABLE_ENUM8 null Value\n"); - err = TestWriteAttributeNullableEnum8NullValue_336(); + ChipLogProgress(chipTool, " ***** Test Step 336 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_336(); break; case 337: - ChipLogProgress(chipTool, " ***** Test Step 337 : Read attribute NULLABLE_ENUM8 null Value\n"); - err = TestReadAttributeNullableEnum8NullValue_337(); + ChipLogProgress(chipTool, " ***** Test Step 337 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_337(); break; case 338: - ChipLogProgress(chipTool, " ***** Test Step 338 : Write attribute NULLABLE_ENUM16 Min Value\n"); - err = TestWriteAttributeNullableEnum16MinValue_338(); + ChipLogProgress(chipTool, " ***** Test Step 338 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_338(); break; case 339: - ChipLogProgress(chipTool, " ***** Test Step 339 : Read attribute NULLABLE_ENUM16 Min Value\n"); - err = TestReadAttributeNullableEnum16MinValue_339(); + ChipLogProgress(chipTool, " ***** Test Step 339 : Write attribute NULLABLE_ENUM16 Min Value\n"); + err = TestWriteAttributeNullableEnum16MinValue_339(); break; case 340: - ChipLogProgress(chipTool, " ***** Test Step 340 : Write attribute NULLABLE_ENUM16 Max Value\n"); - err = TestWriteAttributeNullableEnum16MaxValue_340(); + ChipLogProgress(chipTool, " ***** Test Step 340 : Read attribute NULLABLE_ENUM16 Min Value\n"); + err = TestReadAttributeNullableEnum16MinValue_340(); break; case 341: - ChipLogProgress(chipTool, " ***** Test Step 341 : Read attribute NULLABLE_ENUM16 Max Value\n"); - err = TestReadAttributeNullableEnum16MaxValue_341(); + ChipLogProgress(chipTool, " ***** Test Step 341 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_341(); break; case 342: - ChipLogProgress(chipTool, " ***** Test Step 342 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); - err = TestWriteAttributeNullableEnum16InvalidValue_342(); + ChipLogProgress(chipTool, " ***** Test Step 342 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_342(); break; case 343: - ChipLogProgress(chipTool, " ***** Test Step 343 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); - err = TestReadAttributeNullableEnum16UnchangedValue_343(); + ChipLogProgress(chipTool, " ***** Test Step 343 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_343(); break; case 344: - ChipLogProgress(chipTool, " ***** Test Step 344 : Write attribute NULLABLE_ENUM16 null Value\n"); - err = TestWriteAttributeNullableEnum16NullValue_344(); + ChipLogProgress(chipTool, " ***** Test Step 344 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_344(); break; case 345: - ChipLogProgress(chipTool, " ***** Test Step 345 : Read attribute NULLABLE_ENUM16 null Value\n"); - err = TestReadAttributeNullableEnum16NullValue_345(); + ChipLogProgress(chipTool, " ***** Test Step 345 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_345(); break; case 346: - ChipLogProgress(chipTool, " ***** Test Step 346 : Write attribute NULLABLE_SIMPLE_ENUM Min Value\n"); - err = TestWriteAttributeNullableSimpleEnumMinValue_346(); + ChipLogProgress(chipTool, " ***** Test Step 346 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_346(); break; case 347: - ChipLogProgress(chipTool, " ***** Test Step 347 : Read attribute NULLABLE_SIMPLE_ENUM Min Value\n"); - err = TestReadAttributeNullableSimpleEnumMinValue_347(); + ChipLogProgress(chipTool, " ***** Test Step 347 : Write attribute NULLABLE_SIMPLE_ENUM Min Value\n"); + err = TestWriteAttributeNullableSimpleEnumMinValue_347(); break; case 348: - ChipLogProgress(chipTool, " ***** Test Step 348 : Write attribute NULLABLE_SIMPLE_ENUM Max Value\n"); - err = TestWriteAttributeNullableSimpleEnumMaxValue_348(); + ChipLogProgress(chipTool, " ***** Test Step 348 : Read attribute NULLABLE_SIMPLE_ENUM Min Value\n"); + err = TestReadAttributeNullableSimpleEnumMinValue_348(); break; case 349: - ChipLogProgress(chipTool, " ***** Test Step 349 : Read attribute NULLABLE_SIMPLE_ENUM Max Value\n"); - err = TestReadAttributeNullableSimpleEnumMaxValue_349(); + ChipLogProgress(chipTool, " ***** Test Step 349 : Write attribute NULLABLE_SIMPLE_ENUM Max Value\n"); + err = TestWriteAttributeNullableSimpleEnumMaxValue_349(); break; case 350: - ChipLogProgress(chipTool, " ***** Test Step 350 : Write attribute NULLABLE_SIMPLE_ENUM Invalid Value\n"); - err = TestWriteAttributeNullableSimpleEnumInvalidValue_350(); + ChipLogProgress(chipTool, " ***** Test Step 350 : Read attribute NULLABLE_SIMPLE_ENUM Max Value\n"); + err = TestReadAttributeNullableSimpleEnumMaxValue_350(); break; case 351: - ChipLogProgress(chipTool, " ***** Test Step 351 : Read attribute NULLABLE_SIMPLE_ENUM unchanged Value\n"); - err = TestReadAttributeNullableSimpleEnumUnchangedValue_351(); + ChipLogProgress(chipTool, " ***** Test Step 351 : Write attribute NULLABLE_SIMPLE_ENUM Invalid Value\n"); + err = TestWriteAttributeNullableSimpleEnumInvalidValue_351(); break; case 352: - ChipLogProgress(chipTool, " ***** Test Step 352 : Write attribute NULLABLE_SIMPLE_ENUM null Value\n"); - err = TestWriteAttributeNullableSimpleEnumNullValue_352(); + ChipLogProgress(chipTool, " ***** Test Step 352 : Read attribute NULLABLE_SIMPLE_ENUM unchanged Value\n"); + err = TestReadAttributeNullableSimpleEnumUnchangedValue_352(); break; case 353: - ChipLogProgress(chipTool, " ***** Test Step 353 : Read attribute NULLABLE_SIMPLE_ENUM null Value\n"); - err = TestReadAttributeNullableSimpleEnumNullValue_353(); + ChipLogProgress(chipTool, " ***** Test Step 353 : Write attribute NULLABLE_SIMPLE_ENUM null Value\n"); + err = TestWriteAttributeNullableSimpleEnumNullValue_353(); break; case 354: - ChipLogProgress(chipTool, " ***** Test Step 354 : Read attribute NULLABLE_SIMPLE_ENUM not 3 Value\n"); - err = TestReadAttributeNullableSimpleEnumNot3Value_354(); + ChipLogProgress(chipTool, " ***** Test Step 354 : Read attribute NULLABLE_SIMPLE_ENUM null Value\n"); + err = TestReadAttributeNullableSimpleEnumNullValue_354(); break; case 355: - ChipLogProgress(chipTool, " ***** Test Step 355 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); - err = TestReadAttributeNullableOctetStringDefaultValue_355(); + ChipLogProgress(chipTool, " ***** Test Step 355 : Read attribute NULLABLE_SIMPLE_ENUM not 3 Value\n"); + err = TestReadAttributeNullableSimpleEnumNot3Value_355(); break; case 356: - ChipLogProgress(chipTool, " ***** Test Step 356 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_356(); + ChipLogProgress(chipTool, " ***** Test Step 356 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_356(); break; case 357: - ChipLogProgress(chipTool, " ***** Test Step 357 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_357(); + ChipLogProgress(chipTool, " ***** Test Step 357 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_357(); break; case 358: - ChipLogProgress(chipTool, " ***** Test Step 358 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_358(); + ChipLogProgress(chipTool, " ***** Test Step 358 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_358(); break; case 359: - ChipLogProgress(chipTool, " ***** Test Step 359 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_359(); + ChipLogProgress(chipTool, " ***** Test Step 359 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_359(); break; case 360: - ChipLogProgress(chipTool, " ***** Test Step 360 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_360(); + ChipLogProgress(chipTool, " ***** Test Step 360 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_360(); break; case 361: - ChipLogProgress(chipTool, " ***** Test Step 361 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_361(); + ChipLogProgress(chipTool, " ***** Test Step 361 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_361(); break; case 362: - ChipLogProgress(chipTool, " ***** Test Step 362 : Read attribute NULLABLE_OCTET_STRING not TestValue\n"); - err = TestReadAttributeNullableOctetStringNotTestValue_362(); + ChipLogProgress(chipTool, " ***** Test Step 362 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_362(); break; case 363: - ChipLogProgress(chipTool, " ***** Test Step 363 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); - err = TestReadAttributeNullableCharStringDefaultValue_363(); + ChipLogProgress(chipTool, " ***** Test Step 363 : Read attribute NULLABLE_OCTET_STRING not TestValue\n"); + err = TestReadAttributeNullableOctetStringNotTestValue_363(); break; case 364: - ChipLogProgress(chipTool, " ***** Test Step 364 : Write attribute NULLABLE_CHAR_STRING\n"); - err = TestWriteAttributeNullableCharString_364(); + ChipLogProgress(chipTool, " ***** Test Step 364 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_364(); break; case 365: - ChipLogProgress(chipTool, " ***** Test Step 365 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_365(); + ChipLogProgress(chipTool, " ***** Test Step 365 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_365(); break; case 366: ChipLogProgress(chipTool, " ***** Test Step 366 : Read attribute NULLABLE_CHAR_STRING\n"); err = TestReadAttributeNullableCharString_366(); break; case 367: - ChipLogProgress(chipTool, " ***** Test Step 367 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); - err = TestWriteAttributeNullableCharStringValueTooLong_367(); + ChipLogProgress(chipTool, " ***** Test Step 367 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_367(); break; case 368: - ChipLogProgress(chipTool, " ***** Test Step 368 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_368(); + ChipLogProgress(chipTool, " ***** Test Step 368 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_368(); break; case 369: - ChipLogProgress(chipTool, " ***** Test Step 369 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); - err = TestWriteAttributeNullableCharStringEmpty_369(); + ChipLogProgress(chipTool, " ***** Test Step 369 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_369(); break; case 370: - ChipLogProgress(chipTool, " ***** Test Step 370 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_370(); + ChipLogProgress(chipTool, " ***** Test Step 370 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_370(); break; case 371: - ChipLogProgress(chipTool, " ***** Test Step 371 : Read attribute NULLABLE_CHAR_STRING not ☉T☉\n"); - err = TestReadAttributeNullableCharStringNott_371(); + ChipLogProgress(chipTool, " ***** Test Step 371 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_371(); break; case 372: - ChipLogProgress(chipTool, " ***** Test Step 372 : Read attribute from nonexistent endpoint.\n"); - err = TestReadAttributeFromNonexistentEndpoint_372(); + ChipLogProgress(chipTool, " ***** Test Step 372 : Read attribute NULLABLE_CHAR_STRING not ☉T☉\n"); + err = TestReadAttributeNullableCharStringNott_372(); break; case 373: - ChipLogProgress(chipTool, " ***** Test Step 373 : Read attribute from nonexistent cluster.\n"); - err = TestReadAttributeFromNonexistentCluster_373(); + ChipLogProgress(chipTool, " ***** Test Step 373 : Read attribute from nonexistent endpoint.\n"); + err = TestReadAttributeFromNonexistentEndpoint_373(); break; case 374: - ChipLogProgress(chipTool, " ***** Test Step 374 : Send a command that takes an optional parameter but do not set it.\n"); - err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_374(); + ChipLogProgress(chipTool, " ***** Test Step 374 : Read attribute from nonexistent cluster.\n"); + err = TestReadAttributeFromNonexistentCluster_374(); break; case 375: ChipLogProgress(chipTool, " ***** Test Step 375 : Send a command that takes an optional parameter but do not set it.\n"); err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_375(); break; case 376: - ChipLogProgress(chipTool, " ***** Test Step 376 : Report: Subscribe to list attribute\n"); - err = TestReportSubscribeToListAttribute_376(); + ChipLogProgress(chipTool, " ***** Test Step 376 : Send a command that takes an optional parameter but do not set it.\n"); + err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_376(); break; case 377: - ChipLogProgress(chipTool, " ***** Test Step 377 : Subscribe to list attribute\n"); - err = TestSubscribeToListAttribute_377(); + ChipLogProgress(chipTool, " ***** Test Step 377 : Report: Subscribe to list attribute\n"); + err = TestReportSubscribeToListAttribute_377(); break; case 378: - ChipLogProgress(chipTool, " ***** Test Step 378 : Write subscribed-to list attribute\n"); - err = TestWriteSubscribedToListAttribute_378(); + ChipLogProgress(chipTool, " ***** Test Step 378 : Subscribe to list attribute\n"); + err = TestSubscribeToListAttribute_378(); break; case 379: - ChipLogProgress(chipTool, " ***** Test Step 379 : Check for list attribute report\n"); - err = TestCheckForListAttributeReport_379(); + ChipLogProgress(chipTool, " ***** Test Step 379 : Write subscribed-to list attribute\n"); + err = TestWriteSubscribedToListAttribute_379(); break; case 380: - ChipLogProgress(chipTool, " ***** Test Step 380 : Read range-restricted unsigned 8-bit integer\n"); - err = TestReadRangeRestrictedUnsigned8BitInteger_380(); + ChipLogProgress(chipTool, " ***** Test Step 380 : Check for list attribute report\n"); + err = TestCheckForListAttributeReport_380(); break; case 381: - ChipLogProgress(chipTool, " ***** Test Step 381 : Write min value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_381(); + ChipLogProgress(chipTool, " ***** Test Step 381 : Read range-restricted unsigned 8-bit integer\n"); + err = TestReadRangeRestrictedUnsigned8BitInteger_381(); break; case 382: - ChipLogProgress(chipTool, " ***** Test Step 382 : Write just-below-range value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_382(); + ChipLogProgress(chipTool, " ***** Test Step 382 : Write min value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_382(); break; case 383: - ChipLogProgress(chipTool, " ***** Test Step 383 : Write just-above-range value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_383(); + ChipLogProgress(chipTool, " ***** Test Step 383 : Write just-below-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_383(); break; case 384: - ChipLogProgress(chipTool, " ***** Test Step 384 : Write max value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_384(); + ChipLogProgress(chipTool, " ***** Test Step 384 : Write just-above-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_384(); break; case 385: - ChipLogProgress(chipTool, " ***** Test Step 385 : Verify range-restricted unsigned 8-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_385(); + ChipLogProgress(chipTool, " ***** Test Step 385 : Write max value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_385(); break; case 386: - ChipLogProgress(chipTool, " ***** Test Step 386 : Write min valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_386(); + ChipLogProgress(chipTool, " ***** Test Step 386 : Verify range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_386(); break; case 387: - ChipLogProgress(chipTool, " ***** Test Step 387 : Verify range-restricted unsigned 8-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_387(); + ChipLogProgress(chipTool, " ***** Test Step 387 : Write min valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_387(); break; case 388: - ChipLogProgress(chipTool, " ***** Test Step 388 : Write max valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_388(); + ChipLogProgress(chipTool, " ***** Test Step 388 : Verify range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_388(); break; case 389: - ChipLogProgress(chipTool, " ***** Test Step 389 : Verify range-restricted unsigned 8-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_389(); + ChipLogProgress(chipTool, " ***** Test Step 389 : Write max valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_389(); break; case 390: - ChipLogProgress(chipTool, " ***** Test Step 390 : Write middle valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_390(); + ChipLogProgress(chipTool, " ***** Test Step 390 : Verify range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_390(); break; case 391: - ChipLogProgress(chipTool, " ***** Test Step 391 : Verify range-restricted unsigned 8-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_391(); + ChipLogProgress(chipTool, " ***** Test Step 391 : Write middle valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_391(); break; case 392: - ChipLogProgress(chipTool, " ***** Test Step 392 : Read range-restricted unsigned 16-bit integer\n"); - err = TestReadRangeRestrictedUnsigned16BitInteger_392(); + ChipLogProgress(chipTool, " ***** Test Step 392 : Verify range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_392(); break; case 393: - ChipLogProgress(chipTool, " ***** Test Step 393 : Write min value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_393(); + ChipLogProgress(chipTool, " ***** Test Step 393 : Read range-restricted unsigned 16-bit integer\n"); + err = TestReadRangeRestrictedUnsigned16BitInteger_393(); break; case 394: - ChipLogProgress(chipTool, " ***** Test Step 394 : Write just-below-range value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_394(); + ChipLogProgress(chipTool, " ***** Test Step 394 : Write min value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_394(); break; case 395: - ChipLogProgress(chipTool, " ***** Test Step 395 : Write just-above-range value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_395(); + ChipLogProgress(chipTool, " ***** Test Step 395 : Write just-below-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_395(); break; case 396: - ChipLogProgress(chipTool, " ***** Test Step 396 : Write max value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_396(); + ChipLogProgress(chipTool, " ***** Test Step 396 : Write just-above-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_396(); break; case 397: - ChipLogProgress(chipTool, " ***** Test Step 397 : Verify range-restricted unsigned 16-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_397(); + ChipLogProgress(chipTool, " ***** Test Step 397 : Write max value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_397(); break; case 398: - ChipLogProgress(chipTool, " ***** Test Step 398 : Write min valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_398(); + ChipLogProgress(chipTool, " ***** Test Step 398 : Verify range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_398(); break; case 399: - ChipLogProgress(chipTool, " ***** Test Step 399 : Verify range-restricted unsigned 16-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_399(); + ChipLogProgress(chipTool, " ***** Test Step 399 : Write min valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_399(); break; case 400: - ChipLogProgress(chipTool, " ***** Test Step 400 : Write max valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_400(); + ChipLogProgress(chipTool, " ***** Test Step 400 : Verify range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_400(); break; case 401: - ChipLogProgress(chipTool, " ***** Test Step 401 : Verify range-restricted unsigned 16-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_401(); + ChipLogProgress(chipTool, " ***** Test Step 401 : Write max valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_401(); break; case 402: - ChipLogProgress(chipTool, " ***** Test Step 402 : Write middle valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_402(); + ChipLogProgress(chipTool, " ***** Test Step 402 : Verify range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_402(); break; case 403: - ChipLogProgress(chipTool, " ***** Test Step 403 : Verify range-restricted unsigned 16-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_403(); + ChipLogProgress(chipTool, " ***** Test Step 403 : Write middle valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_403(); break; case 404: - ChipLogProgress(chipTool, " ***** Test Step 404 : Read range-restricted signed 8-bit integer\n"); - err = TestReadRangeRestrictedSigned8BitInteger_404(); + ChipLogProgress(chipTool, " ***** Test Step 404 : Verify range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_404(); break; case 405: - ChipLogProgress(chipTool, " ***** Test Step 405 : Write min value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedSigned8BitInteger_405(); + ChipLogProgress(chipTool, " ***** Test Step 405 : Read range-restricted signed 8-bit integer\n"); + err = TestReadRangeRestrictedSigned8BitInteger_405(); break; case 406: - ChipLogProgress(chipTool, " ***** Test Step 406 : Write just-below-range value to a range-restricted signed 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_406(); + ChipLogProgress(chipTool, " ***** Test Step 406 : Write min value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned8BitInteger_406(); break; case 407: - ChipLogProgress(chipTool, " ***** Test Step 407 : Write just-above-range value to a range-restricted signed 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_407(); + ChipLogProgress(chipTool, " ***** Test Step 407 : Write just-below-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_407(); break; case 408: - ChipLogProgress(chipTool, " ***** Test Step 408 : Write max value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedSigned8BitInteger_408(); + ChipLogProgress(chipTool, " ***** Test Step 408 : Write just-above-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_408(); break; case 409: - ChipLogProgress(chipTool, " ***** Test Step 409 : Verify range-restricted signed 8-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_409(); + ChipLogProgress(chipTool, " ***** Test Step 409 : Write max value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned8BitInteger_409(); break; case 410: - ChipLogProgress(chipTool, " ***** Test Step 410 : Write min valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_410(); + ChipLogProgress(chipTool, " ***** Test Step 410 : Verify range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_410(); break; case 411: - ChipLogProgress(chipTool, " ***** Test Step 411 : Verify range-restricted signed 8-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_411(); + ChipLogProgress(chipTool, " ***** Test Step 411 : Write min valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_411(); break; case 412: - ChipLogProgress(chipTool, " ***** Test Step 412 : Write max valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_412(); + ChipLogProgress(chipTool, " ***** Test Step 412 : Verify range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_412(); break; case 413: - ChipLogProgress(chipTool, " ***** Test Step 413 : Verify range-restricted signed 8-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_413(); + ChipLogProgress(chipTool, " ***** Test Step 413 : Write max valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_413(); break; case 414: - ChipLogProgress(chipTool, " ***** Test Step 414 : Write middle valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_414(); + ChipLogProgress(chipTool, " ***** Test Step 414 : Verify range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_414(); break; case 415: - ChipLogProgress(chipTool, " ***** Test Step 415 : Verify range-restricted signed 8-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_415(); + ChipLogProgress(chipTool, " ***** Test Step 415 : Write middle valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_415(); break; case 416: - ChipLogProgress(chipTool, " ***** Test Step 416 : Read range-restricted signed 16-bit integer\n"); - err = TestReadRangeRestrictedSigned16BitInteger_416(); + ChipLogProgress(chipTool, " ***** Test Step 416 : Verify range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_416(); break; case 417: - ChipLogProgress(chipTool, " ***** Test Step 417 : Write min value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedSigned16BitInteger_417(); + ChipLogProgress(chipTool, " ***** Test Step 417 : Read range-restricted signed 16-bit integer\n"); + err = TestReadRangeRestrictedSigned16BitInteger_417(); break; case 418: - ChipLogProgress(chipTool, " ***** Test Step 418 : Write just-below-range value to a range-restricted signed 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_418(); + ChipLogProgress(chipTool, " ***** Test Step 418 : Write min value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned16BitInteger_418(); break; case 419: - ChipLogProgress(chipTool, " ***** Test Step 419 : Write just-above-range value to a range-restricted signed 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_419(); + ChipLogProgress(chipTool, " ***** Test Step 419 : Write just-below-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_419(); break; case 420: - ChipLogProgress(chipTool, " ***** Test Step 420 : Write max value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedSigned16BitInteger_420(); + ChipLogProgress(chipTool, " ***** Test Step 420 : Write just-above-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_420(); break; case 421: - ChipLogProgress(chipTool, " ***** Test Step 421 : Verify range-restricted signed 16-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_421(); + ChipLogProgress(chipTool, " ***** Test Step 421 : Write max value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned16BitInteger_421(); break; case 422: - ChipLogProgress(chipTool, " ***** Test Step 422 : Write min valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_422(); + ChipLogProgress(chipTool, " ***** Test Step 422 : Verify range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_422(); break; case 423: - ChipLogProgress(chipTool, " ***** Test Step 423 : Verify range-restricted signed 16-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_423(); + ChipLogProgress(chipTool, " ***** Test Step 423 : Write min valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_423(); break; case 424: - ChipLogProgress(chipTool, " ***** Test Step 424 : Write max valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_424(); + ChipLogProgress(chipTool, " ***** Test Step 424 : Verify range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_424(); break; case 425: - ChipLogProgress(chipTool, " ***** Test Step 425 : Verify range-restricted signed 16-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_425(); + ChipLogProgress(chipTool, " ***** Test Step 425 : Write max valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_425(); break; case 426: - ChipLogProgress(chipTool, " ***** Test Step 426 : Write middle valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_426(); + ChipLogProgress(chipTool, " ***** Test Step 426 : Verify range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_426(); break; case 427: - ChipLogProgress(chipTool, " ***** Test Step 427 : Verify range-restricted signed 16-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_427(); + ChipLogProgress(chipTool, " ***** Test Step 427 : Write middle valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_427(); break; case 428: - ChipLogProgress(chipTool, " ***** Test Step 428 : Read nullable range-restricted unsigned 8-bit integer\n"); - err = TestReadNullableRangeRestrictedUnsigned8BitInteger_428(); + ChipLogProgress(chipTool, " ***** Test Step 428 : Verify range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_428(); break; case 429: - ChipLogProgress(chipTool, " ***** Test Step 429 : Write min value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_429(); + ChipLogProgress(chipTool, " ***** Test Step 429 : Read nullable range-restricted unsigned 8-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned8BitInteger_429(); break; case 430: - ChipLogProgress(chipTool, " ***** Test Step 430 : Write just-below-range value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_430(); + ChipLogProgress(chipTool, " ***** Test Step 430 : Write min value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_430(); break; case 431: - ChipLogProgress(chipTool, " ***** Test Step 431 : Write just-above-range value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_431(); + ChipLogProgress(chipTool, " ***** Test Step 431 : Write just-below-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_431(); break; case 432: - ChipLogProgress(chipTool, " ***** Test Step 432 : Write max value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_432(); + ChipLogProgress(chipTool, " ***** Test Step 432 : Write just-above-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_432(); break; case 433: - ChipLogProgress(chipTool, " ***** Test Step 433 : Verify nullable range-restricted unsigned 8-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_433(); + ChipLogProgress(chipTool, " ***** Test Step 433 : Write max value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_433(); break; case 434: - ChipLogProgress(chipTool, " ***** Test Step 434 : Write min valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_434(); + ChipLogProgress(chipTool, " ***** Test Step 434 : Verify nullable range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_434(); break; case 435: - ChipLogProgress(chipTool, " ***** Test Step 435 : Verify nullable range-restricted unsigned 8-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_435(); + ChipLogProgress(chipTool, " ***** Test Step 435 : Write min valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_435(); break; case 436: - ChipLogProgress(chipTool, " ***** Test Step 436 : Write max valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_436(); + ChipLogProgress(chipTool, " ***** Test Step 436 : Verify nullable range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_436(); break; case 437: - ChipLogProgress(chipTool, " ***** Test Step 437 : Verify nullable range-restricted unsigned 8-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_437(); + ChipLogProgress(chipTool, " ***** Test Step 437 : Write max valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_437(); break; case 438: - ChipLogProgress(chipTool, " ***** Test Step 438 : Write middle valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_438(); + ChipLogProgress(chipTool, " ***** Test Step 438 : Verify nullable range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_438(); break; case 439: - ChipLogProgress(chipTool, " ***** Test Step 439 : Verify nullable range-restricted unsigned 8-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_439(); + ChipLogProgress(chipTool, " ***** Test Step 439 : Write middle valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_439(); break; case 440: - ChipLogProgress(chipTool, " ***** Test Step 440 : Write null value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_440(); + ChipLogProgress(chipTool, " ***** Test Step 440 : Verify nullable range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_440(); break; case 441: - ChipLogProgress(chipTool, " ***** Test Step 441 : Verify nullable range-restricted unsigned 8-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_441(); + ChipLogProgress(chipTool, " ***** Test Step 441 : Write null value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_441(); break; case 442: - ChipLogProgress(chipTool, " ***** Test Step 442 : Read nullable range-restricted unsigned 16-bit integer\n"); - err = TestReadNullableRangeRestrictedUnsigned16BitInteger_442(); + ChipLogProgress(chipTool, " ***** Test Step 442 : Verify nullable range-restricted unsigned 8-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_442(); break; case 443: - ChipLogProgress(chipTool, " ***** Test Step 443 : Write min value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_443(); + ChipLogProgress(chipTool, " ***** Test Step 443 : Read nullable range-restricted unsigned 16-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned16BitInteger_443(); break; case 444: - ChipLogProgress(chipTool, " ***** Test Step 444 : Write just-below-range value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_444(); + ChipLogProgress(chipTool, " ***** Test Step 444 : Write min value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_444(); break; case 445: - ChipLogProgress(chipTool, " ***** Test Step 445 : Write just-above-range value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_445(); + ChipLogProgress(chipTool, " ***** Test Step 445 : Write just-below-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_445(); break; case 446: - ChipLogProgress(chipTool, " ***** Test Step 446 : Write max value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_446(); + ChipLogProgress(chipTool, " ***** Test Step 446 : Write just-above-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_446(); break; case 447: - ChipLogProgress(chipTool, " ***** Test Step 447 : Verify nullable range-restricted unsigned 16-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_447(); + ChipLogProgress(chipTool, " ***** Test Step 447 : Write max value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_447(); break; case 448: - ChipLogProgress(chipTool, " ***** Test Step 448 : Write min valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_448(); + ChipLogProgress(chipTool, " ***** Test Step 448 : Verify nullable range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_448(); break; case 449: - ChipLogProgress(chipTool, " ***** Test Step 449 : Verify nullable range-restricted unsigned 16-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_449(); + ChipLogProgress(chipTool, " ***** Test Step 449 : Write min valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_449(); break; case 450: - ChipLogProgress(chipTool, " ***** Test Step 450 : Write max valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_450(); + ChipLogProgress(chipTool, " ***** Test Step 450 : Verify nullable range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_450(); break; case 451: - ChipLogProgress(chipTool, " ***** Test Step 451 : Verify nullable range-restricted unsigned 16-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_451(); + ChipLogProgress(chipTool, " ***** Test Step 451 : Write max valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_451(); break; case 452: - ChipLogProgress(chipTool, " ***** Test Step 452 : Write middle valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_452(); + ChipLogProgress(chipTool, " ***** Test Step 452 : Verify nullable range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_452(); break; case 453: - ChipLogProgress(chipTool, " ***** Test Step 453 : Verify nullable range-restricted unsigned 16-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_453(); + ChipLogProgress(chipTool, " ***** Test Step 453 : Write middle valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_453(); break; case 454: - ChipLogProgress(chipTool, " ***** Test Step 454 : Write null value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_454(); + ChipLogProgress(chipTool, " ***** Test Step 454 : Verify nullable range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_454(); break; case 455: - ChipLogProgress(chipTool, " ***** Test Step 455 : Verify nullable range-restricted unsigned 16-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_455(); + ChipLogProgress(chipTool, " ***** Test Step 455 : Write null value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_455(); break; case 456: - ChipLogProgress(chipTool, " ***** Test Step 456 : Read nullable range-restricted signed 8-bit integer\n"); - err = TestReadNullableRangeRestrictedSigned8BitInteger_456(); + ChipLogProgress(chipTool, " ***** Test Step 456 : Verify nullable range-restricted unsigned 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_456(); break; case 457: - ChipLogProgress(chipTool, " ***** Test Step 457 : Write min value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_457(); + ChipLogProgress(chipTool, " ***** Test Step 457 : Read nullable range-restricted signed 8-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned8BitInteger_457(); break; case 458: - ChipLogProgress(chipTool, " ***** Test Step 458 : Write just-below-range value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_458(); + ChipLogProgress(chipTool, " ***** Test Step 458 : Write min value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_458(); break; case 459: - ChipLogProgress(chipTool, " ***** Test Step 459 : Write just-above-range value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_459(); + ChipLogProgress(chipTool, " ***** Test Step 459 : Write just-below-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_459(); break; case 460: - ChipLogProgress(chipTool, " ***** Test Step 460 : Write max value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_460(); + ChipLogProgress(chipTool, " ***** Test Step 460 : Write just-above-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_460(); break; case 461: - ChipLogProgress(chipTool, " ***** Test Step 461 : Verify nullable range-restricted signed 8-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_461(); + ChipLogProgress(chipTool, " ***** Test Step 461 : Write max value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_461(); break; case 462: - ChipLogProgress(chipTool, " ***** Test Step 462 : Write min valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_462(); + ChipLogProgress(chipTool, " ***** Test Step 462 : Verify nullable range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_462(); break; case 463: - ChipLogProgress(chipTool, " ***** Test Step 463 : Verify nullable range-restricted signed 8-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_463(); + ChipLogProgress(chipTool, " ***** Test Step 463 : Write min valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_463(); break; case 464: - ChipLogProgress(chipTool, " ***** Test Step 464 : Write max valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_464(); + ChipLogProgress(chipTool, " ***** Test Step 464 : Verify nullable range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_464(); break; case 465: - ChipLogProgress(chipTool, " ***** Test Step 465 : Verify nullable range-restricted signed 8-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_465(); + ChipLogProgress(chipTool, " ***** Test Step 465 : Write max valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_465(); break; case 466: - ChipLogProgress(chipTool, " ***** Test Step 466 : Write middle valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_466(); + ChipLogProgress(chipTool, " ***** Test Step 466 : Verify nullable range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_466(); break; case 467: - ChipLogProgress(chipTool, " ***** Test Step 467 : Verify nullable range-restricted signed 8-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_467(); + ChipLogProgress(chipTool, " ***** Test Step 467 : Write middle valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_467(); break; case 468: - ChipLogProgress(chipTool, " ***** Test Step 468 : Write null value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_468(); + ChipLogProgress(chipTool, " ***** Test Step 468 : Verify nullable range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_468(); break; case 469: - ChipLogProgress(chipTool, " ***** Test Step 469 : Verify nullable range-restricted signed 8-bit integer value is at null\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_469(); + ChipLogProgress(chipTool, " ***** Test Step 469 : Write null value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_469(); break; case 470: - ChipLogProgress(chipTool, " ***** Test Step 470 : Read nullable range-restricted signed 16-bit integer\n"); - err = TestReadNullableRangeRestrictedSigned16BitInteger_470(); + ChipLogProgress(chipTool, " ***** Test Step 470 : Verify nullable range-restricted signed 8-bit integer value is at null\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_470(); break; case 471: - ChipLogProgress(chipTool, " ***** Test Step 471 : Write min value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_471(); + ChipLogProgress(chipTool, " ***** Test Step 471 : Read nullable range-restricted signed 16-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned16BitInteger_471(); break; case 472: - ChipLogProgress(chipTool, " ***** Test Step 472 : Write just-below-range value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_472(); + ChipLogProgress(chipTool, " ***** Test Step 472 : Write min value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_472(); break; case 473: - ChipLogProgress(chipTool, " ***** Test Step 473 : Write just-above-range value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_473(); + ChipLogProgress(chipTool, " ***** Test Step 473 : Write just-below-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_473(); break; case 474: - ChipLogProgress(chipTool, " ***** Test Step 474 : Write max value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_474(); + ChipLogProgress(chipTool, " ***** Test Step 474 : Write just-above-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_474(); break; case 475: - ChipLogProgress(chipTool, " ***** Test Step 475 : Verify nullable range-restricted signed 16-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_475(); + ChipLogProgress(chipTool, " ***** Test Step 475 : Write max value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_475(); break; case 476: - ChipLogProgress(chipTool, " ***** Test Step 476 : Write min valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_476(); + ChipLogProgress(chipTool, " ***** Test Step 476 : Verify nullable range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_476(); break; case 477: - ChipLogProgress(chipTool, " ***** Test Step 477 : Verify nullable range-restricted signed 16-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_477(); + ChipLogProgress(chipTool, " ***** Test Step 477 : Write min valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_477(); break; case 478: - ChipLogProgress(chipTool, " ***** Test Step 478 : Write max valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_478(); + ChipLogProgress(chipTool, " ***** Test Step 478 : Verify nullable range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_478(); break; case 479: - ChipLogProgress(chipTool, " ***** Test Step 479 : Verify nullable range-restricted signed 16-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_479(); + ChipLogProgress(chipTool, " ***** Test Step 479 : Write max valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_479(); break; case 480: - ChipLogProgress(chipTool, " ***** Test Step 480 : Write middle valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_480(); + ChipLogProgress(chipTool, " ***** Test Step 480 : Verify nullable range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_480(); break; case 481: - ChipLogProgress(chipTool, " ***** Test Step 481 : Verify nullable range-restricted signed 16-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_481(); + ChipLogProgress(chipTool, " ***** Test Step 481 : Write middle valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_481(); break; case 482: - ChipLogProgress(chipTool, " ***** Test Step 482 : Write null value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_482(); + ChipLogProgress(chipTool, " ***** Test Step 482 : Verify nullable range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_482(); break; case 483: - ChipLogProgress(chipTool, " ***** Test Step 483 : Verify nullable range-restricted signed 16-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_483(); + ChipLogProgress(chipTool, " ***** Test Step 483 : Write null value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_483(); break; case 484: - ChipLogProgress(chipTool, " ***** Test Step 484 : Write attribute that returns general status on write\n"); - err = TestWriteAttributeThatReturnsGeneralStatusOnWrite_484(); + ChipLogProgress(chipTool, " ***** Test Step 484 : Verify nullable range-restricted signed 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_484(); break; case 485: - ChipLogProgress(chipTool, " ***** Test Step 485 : Write attribute that returns cluster-specific status on write\n"); - err = TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_485(); + ChipLogProgress(chipTool, " ***** Test Step 485 : Write attribute that returns general status on write\n"); + err = TestWriteAttributeThatReturnsGeneralStatusOnWrite_485(); break; case 486: - ChipLogProgress(chipTool, " ***** Test Step 486 : Read attribute that returns general status on read\n"); - err = TestReadAttributeThatReturnsGeneralStatusOnRead_486(); + ChipLogProgress(chipTool, " ***** Test Step 486 : Write attribute that returns cluster-specific status on write\n"); + err = TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_486(); break; case 487: - ChipLogProgress(chipTool, " ***** Test Step 487 : read attribute that returns cluster-specific status on read\n"); - err = TestReadAttributeThatReturnsClusterSpecificStatusOnRead_487(); + ChipLogProgress(chipTool, " ***** Test Step 487 : Read attribute that returns general status on read\n"); + err = TestReadAttributeThatReturnsGeneralStatusOnRead_487(); break; case 488: - ChipLogProgress(chipTool, " ***** Test Step 488 : read AcceptedCommandList attribute\n"); - err = TestReadAcceptedCommandListAttribute_488(); + ChipLogProgress(chipTool, " ***** Test Step 488 : read attribute that returns cluster-specific status on read\n"); + err = TestReadAttributeThatReturnsClusterSpecificStatusOnRead_488(); break; case 489: - ChipLogProgress(chipTool, " ***** Test Step 489 : read GeneratedCommandList attribute\n"); - err = TestReadGeneratedCommandListAttribute_489(); + ChipLogProgress(chipTool, " ***** Test Step 489 : Write different vendor MEI attribute\n"); + err = TestWriteDifferentVendorMeiAttribute_489(); break; case 490: - ChipLogProgress(chipTool, " ***** Test Step 490 : Write struct-typed attribute\n"); - err = TestWriteStructTypedAttribute_490(); + ChipLogProgress(chipTool, " ***** Test Step 490 : Verify different vendor MEI attribute\n"); + err = TestVerifyDifferentVendorMeiAttribute_490(); break; case 491: - ChipLogProgress(chipTool, " ***** Test Step 491 : Read struct-typed attribute\n"); - err = TestReadStructTypedAttribute_491(); + ChipLogProgress(chipTool, " ***** Test Step 491 : Validate AcceptedCommandList attribute\n"); + err = TestValidateAcceptedCommandListAttribute_491(); + break; + case 492: + ChipLogProgress(chipTool, " ***** Test Step 492 : Validate GeneratedCommandList attribute\n"); + err = TestValidateGeneratedCommandListAttribute_492(); + break; + case 493: + ChipLogProgress(chipTool, " ***** Test Step 493 : Validate presence of MEI attribute\n"); + err = TestValidatePresenceOfMeiAttribute_493(); + break; + case 494: + ChipLogProgress(chipTool, " ***** Test Step 494 : Write struct-typed attribute\n"); + err = TestWriteStructTypedAttribute_494(); + break; + case 495: + ChipLogProgress(chipTool, " ***** Test Step 495 : Read struct-typed attribute\n"); + err = TestReadStructTypedAttribute_495(); break; } @@ -129661,10 +129677,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 190: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 191: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 192: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129682,10 +129698,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 197: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 198: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 199: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129700,10 +129716,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 203: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 204: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 205: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129718,10 +129734,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 209: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 210: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 211: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129742,10 +129758,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 217: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 218: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 219: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129784,10 +129800,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 231: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 232: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 233: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129823,10 +129839,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 244: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 245: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 246: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129862,10 +129878,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 257: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 258: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 259: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129895,10 +129911,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 268: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 269: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 270: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129928,10 +129944,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 279: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 280: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 281: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129961,10 +129977,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 290: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 291: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 292: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -129994,10 +130010,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 301: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 302: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 303: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130093,10 +130109,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 334: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 335: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 336: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130117,10 +130133,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 342: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 343: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 344: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130141,10 +130157,10 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 350: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 351: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 352: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130207,16 +130223,16 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 372: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 373: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT)); break; case 374: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); break; case 375: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 376: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130234,7 +130250,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 381: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 382: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130246,7 +130262,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 385: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 386: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130270,7 +130286,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 393: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 394: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130282,7 +130298,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 397: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 398: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130306,7 +130322,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 405: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 406: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130318,7 +130334,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 409: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 410: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130342,7 +130358,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 417: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 418: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130354,7 +130370,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 421: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 422: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130378,7 +130394,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 429: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 430: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130390,7 +130406,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 433: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 434: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130420,7 +130436,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 443: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 444: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130432,7 +130448,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 447: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 448: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130462,7 +130478,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 457: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 458: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130474,7 +130490,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 461: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 462: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130504,7 +130520,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 471: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 472: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -130516,7 +130532,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 475: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 476: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130543,19 +130559,19 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 484: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 485: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); break; case 486: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 487: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); break; case 488: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 489: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -130566,6 +130582,18 @@ class TestCluster : public TestCommandBridge { case 491: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 492: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 493: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 494: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 495: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -130576,7 +130604,7 @@ class TestCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 492; + const uint16_t mTestCount = 496; chip::Optional mNodeId; chip::Optional mCluster; @@ -135174,7 +135202,38 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_164() + CHIP_ERROR TestSendMeiCommandInCluster_164() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRUnitTestingClusterTestDifferentVendorMeiRequestParams alloc] init]; + params.arg1 = + [NSNumber numberWithUnsignedChar:76U]; + [cluster testDifferentVendorMeiRequestWithParams:params completion: + ^(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Send MEI command in cluster: Error: %@", err); + } else { + NSLog(@"Send MEI command in cluster: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.arg1; + VerifyOrReturn(CheckValue("arg1", actualValue, 76U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_165() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135225,7 +135284,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_165() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_166() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135278,7 +135337,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_166() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_167() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135338,7 +135397,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_167() + CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_168() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135371,7 +135430,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_168() + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_169() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135438,7 +135497,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_169() + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_170() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135505,7 +135564,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_170() + CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_171() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135627,7 +135686,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_171() + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_172() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135749,7 +135808,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_172() + CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_173() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135784,7 +135843,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_173() + CHIP_ERROR TestReadAttributeListWithListOfInt8u_174() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135815,7 +135874,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_174() + CHIP_ERROR TestWriteAttributeListWithListOfOctetString_175() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135850,7 +135909,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_175() + CHIP_ERROR TestReadAttributeListWithListOfOctetString_176() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135881,7 +135940,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_176() + CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_177() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135932,7 +135991,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_177() + CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_178() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135967,7 +136026,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_178() + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_179() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136014,7 +136073,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_179() + CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_180() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136043,7 +136102,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_180() + CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_181() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136074,7 +136133,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_181() + CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_182() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136114,7 +136173,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_182() + CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_183() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136148,7 +136207,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBooleanNull_183() + CHIP_ERROR TestWriteAttributeNullableBooleanNull_184() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136173,7 +136232,7 @@ class TestCluster : public TestCommandBridge { } NSNumber * _Nullable booValueNull; - CHIP_ERROR TestReadAttributeNullableBooleanNull_184() + CHIP_ERROR TestReadAttributeNullableBooleanNull_185() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136203,7 +136262,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_185() + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_186() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136228,7 +136287,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_186() + CHIP_ERROR TestReadAttributeNullableBooleanTrue_187() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136256,7 +136315,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBooleanNotNull_187() + CHIP_ERROR TestReadAttributeNullableBooleanNotNull_188() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136282,7 +136341,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_188() + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_189() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136307,7 +136366,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_189() + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_190() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136335,7 +136394,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_190() + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_191() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136360,7 +136419,7 @@ class TestCluster : public TestCommandBridge { } NSNumber * _Nullable nullableValue254; - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_191() + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_192() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136391,7 +136450,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_192() + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_193() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136415,7 +136474,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_193() + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_194() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136442,7 +136501,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap8Not254Value_194() + CHIP_ERROR TestReadAttributeNullableBitmap8Not254Value_195() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136468,7 +136527,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_195() + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_196() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136493,7 +136552,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_196() + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_197() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136521,7 +136580,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_197() + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_198() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136545,7 +136604,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_198() + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_199() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136573,7 +136632,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_199() + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_200() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136597,7 +136656,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_200() + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_201() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136624,7 +136683,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_201() + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_202() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136649,7 +136708,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_202() + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_203() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136677,7 +136736,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_203() + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_204() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136701,7 +136760,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_204() + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_205() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136729,7 +136788,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_205() + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_206() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136753,7 +136812,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_206() + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_207() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136780,7 +136839,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_207() + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_208() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136805,7 +136864,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_208() + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_209() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136833,7 +136892,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_209() + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_210() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136857,7 +136916,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_210() + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_211() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136885,7 +136944,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_211() + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_212() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136909,7 +136968,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_212() + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_213() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136936,7 +136995,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_213() + CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_214() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136961,7 +137020,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uMinValue_214() + CHIP_ERROR TestReadAttributeNullableInt8uMinValue_215() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136989,7 +137048,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_215() + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_216() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137014,7 +137073,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_216() + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_217() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137042,7 +137101,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_217() + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_218() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137066,7 +137125,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_218() + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_219() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137094,7 +137153,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_219() + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_220() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137120,7 +137179,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_220() + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_221() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137144,7 +137203,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_221() + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_222() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137171,7 +137230,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_222() + CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_223() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137199,7 +137258,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_223() + CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_224() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137225,7 +137284,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8uValue_224() + CHIP_ERROR TestWriteAttributeNullableInt8uValue_225() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137250,7 +137309,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_225() + CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_226() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137278,7 +137337,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_226() + CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_227() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137304,7 +137363,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_227() + CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_228() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137329,7 +137388,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uMinValue_228() + CHIP_ERROR TestReadAttributeNullableInt16uMinValue_229() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137357,7 +137416,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_229() + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_230() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137382,7 +137441,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_230() + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_231() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137410,7 +137469,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_231() + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_232() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137434,7 +137493,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_232() + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_233() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137462,7 +137521,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_233() + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_234() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137486,7 +137545,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_234() + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_235() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137513,7 +137572,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_235() + CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_236() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137541,7 +137600,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_236() + CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_237() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137567,7 +137626,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16uValue_237() + CHIP_ERROR TestWriteAttributeNullableInt16uValue_238() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137592,7 +137651,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_238() + CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_239() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137620,7 +137679,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_239() + CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_240() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137646,7 +137705,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_240() + CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_241() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137671,7 +137730,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uMinValue_241() + CHIP_ERROR TestReadAttributeNullableInt32uMinValue_242() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137699,7 +137758,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_242() + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_243() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137724,7 +137783,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_243() + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_244() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137752,7 +137811,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_244() + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_245() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137776,7 +137835,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_245() + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_246() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137804,7 +137863,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_246() + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_247() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137828,7 +137887,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_247() + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_248() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137855,7 +137914,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_248() + CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_249() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137883,7 +137942,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_249() + CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_250() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137909,7 +137968,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32uValue_250() + CHIP_ERROR TestWriteAttributeNullableInt32uValue_251() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137934,7 +137993,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_251() + CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_252() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137962,7 +138021,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_252() + CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_253() { MTRBaseDevice * device = GetDevice("alpha"); @@ -137988,7 +138047,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_253() + CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_254() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138013,7 +138072,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uMinValue_254() + CHIP_ERROR TestReadAttributeNullableInt64uMinValue_255() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138041,7 +138100,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_255() + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_256() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138066,7 +138125,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_256() + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_257() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138094,7 +138153,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_257() + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_258() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138118,7 +138177,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_258() + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_259() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138146,7 +138205,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_259() + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_260() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138170,7 +138229,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_260() + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_261() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138197,7 +138256,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_261() + CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_262() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138225,7 +138284,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_262() + CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_263() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138251,7 +138310,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64uValue_263() + CHIP_ERROR TestWriteAttributeNullableInt64uValue_264() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138276,7 +138335,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_264() + CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_265() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138304,7 +138363,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_265() + CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_266() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138330,7 +138389,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_266() + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_267() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138355,7 +138414,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_267() + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_268() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138383,7 +138442,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_268() + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_269() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138407,7 +138466,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_269() + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_270() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138435,7 +138494,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_270() + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_271() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138459,7 +138518,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_271() + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_272() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138486,7 +138545,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_272() + CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_273() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138514,7 +138573,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_273() + CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_274() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138540,7 +138599,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt8sValue_274() + CHIP_ERROR TestWriteAttributeNullableInt8sValue_275() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138565,7 +138624,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_275() + CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_276() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138593,7 +138652,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_276() + CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_277() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138619,7 +138678,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_277() + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_278() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138644,7 +138703,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_278() + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_279() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138672,7 +138731,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_279() + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_280() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138696,7 +138755,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_280() + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_281() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138724,7 +138783,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_281() + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_282() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138748,7 +138807,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_282() + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_283() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138775,7 +138834,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_283() + CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_284() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138803,7 +138862,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_284() + CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_285() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138829,7 +138888,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt16sValue_285() + CHIP_ERROR TestWriteAttributeNullableInt16sValue_286() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138854,7 +138913,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_286() + CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_287() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138882,7 +138941,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_287() + CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_288() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138908,7 +138967,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_288() + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_289() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138933,7 +138992,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_289() + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_290() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138961,7 +139020,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_290() + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_291() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138985,7 +139044,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_291() + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_292() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139013,7 +139072,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_292() + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_293() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139037,7 +139096,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_293() + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_294() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139064,7 +139123,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_294() + CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_295() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139092,7 +139151,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_295() + CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_296() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139118,7 +139177,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt32sValue_296() + CHIP_ERROR TestWriteAttributeNullableInt32sValue_297() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139143,7 +139202,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_297() + CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_298() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139171,7 +139230,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_298() + CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_299() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139197,7 +139256,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_299() + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_300() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139222,7 +139281,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_300() + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_301() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139250,7 +139309,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_301() + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_302() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139274,7 +139333,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_302() + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_303() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139302,7 +139361,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_303() + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_304() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139326,7 +139385,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_304() + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_305() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139353,7 +139412,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_305() + CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_306() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139381,7 +139440,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_306() + CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_307() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139407,7 +139466,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableInt64sValue_307() + CHIP_ERROR TestWriteAttributeNullableInt64sValue_308() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139432,7 +139491,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_308() + CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_309() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139460,7 +139519,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_309() + CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_310() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139486,7 +139545,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_310() + CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_311() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139511,7 +139570,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSingleMediumValue_311() + CHIP_ERROR TestReadAttributeNullableSingleMediumValue_312() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139539,7 +139598,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_312() + CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_313() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139564,7 +139623,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSingleLargestValue_313() + CHIP_ERROR TestReadAttributeNullableSingleLargestValue_314() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139592,7 +139651,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_314() + CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_315() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139617,7 +139676,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_315() + CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_316() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139645,7 +139704,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSingleNullValue_316() + CHIP_ERROR TestWriteAttributeNullableSingleNullValue_317() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139669,7 +139728,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSingleNullValue_317() + CHIP_ERROR TestReadAttributeNullableSingleNullValue_318() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139696,7 +139755,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSingle0Value_318() + CHIP_ERROR TestWriteAttributeNullableSingle0Value_319() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139721,7 +139780,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSingle0Value_319() + CHIP_ERROR TestReadAttributeNullableSingle0Value_320() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139749,7 +139808,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_320() + CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_321() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139774,7 +139833,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_321() + CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_322() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139802,7 +139861,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_322() + CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_323() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139827,7 +139886,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_323() + CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_324() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139855,7 +139914,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_324() + CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_325() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139880,7 +139939,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_325() + CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_326() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139908,7 +139967,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_326() + CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_327() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139932,7 +139991,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableDoubleNullValue_327() + CHIP_ERROR TestReadAttributeNullableDoubleNullValue_328() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139959,7 +140018,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableDouble0Value_328() + CHIP_ERROR TestWriteAttributeNullableDouble0Value_329() { MTRBaseDevice * device = GetDevice("alpha"); @@ -139984,7 +140043,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableDouble0Value_329() + CHIP_ERROR TestReadAttributeNullableDouble0Value_330() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140012,7 +140071,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_330() + CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_331() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140037,7 +140096,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum8MinValue_331() + CHIP_ERROR TestReadAttributeNullableEnum8MinValue_332() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140065,7 +140124,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_332() + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_333() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140090,7 +140149,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_333() + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_334() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140118,7 +140177,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_334() + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_335() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140142,7 +140201,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_335() + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_336() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140170,7 +140229,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_336() + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_337() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140194,7 +140253,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_337() + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_338() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140221,7 +140280,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_338() + CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_339() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140246,7 +140305,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum16MinValue_339() + CHIP_ERROR TestReadAttributeNullableEnum16MinValue_340() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140274,7 +140333,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_340() + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_341() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140299,7 +140358,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_341() + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_342() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140327,7 +140386,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_342() + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_343() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140351,7 +140410,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_343() + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_344() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140379,7 +140438,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_344() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_345() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140403,7 +140462,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_345() + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_346() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140430,7 +140489,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_346() + CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_347() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140455,7 +140514,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_347() + CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_348() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140483,7 +140542,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_348() + CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_349() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140508,7 +140567,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_349() + CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_350() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140536,7 +140595,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_350() + CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_351() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140561,7 +140620,7 @@ class TestCluster : public TestCommandBridge { } NSNumber * _Nullable nullableEnumAttr3; - CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_351() + CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_352() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140592,7 +140651,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_352() + CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_353() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140616,7 +140675,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_353() + CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_354() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140643,7 +140702,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableSimpleEnumNot3Value_354() + CHIP_ERROR TestReadAttributeNullableSimpleEnumNot3Value_355() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140669,7 +140728,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_355() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_356() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140697,7 +140756,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableOctetString_356() + CHIP_ERROR TestWriteAttributeNullableOctetString_357() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140723,7 +140782,7 @@ class TestCluster : public TestCommandBridge { } NSData * _Nullable nullableOctetStrTestValue; - CHIP_ERROR TestReadAttributeNullableOctetString_357() + CHIP_ERROR TestReadAttributeNullableOctetString_358() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140754,7 +140813,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableOctetString_358() + CHIP_ERROR TestWriteAttributeNullableOctetString_359() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140778,7 +140837,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableOctetString_359() + CHIP_ERROR TestReadAttributeNullableOctetString_360() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140805,7 +140864,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableOctetString_360() + CHIP_ERROR TestWriteAttributeNullableOctetString_361() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140830,7 +140889,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableOctetString_361() + CHIP_ERROR TestReadAttributeNullableOctetString_362() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140858,7 +140917,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableOctetStringNotTestValue_362() + CHIP_ERROR TestReadAttributeNullableOctetStringNotTestValue_363() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140884,7 +140943,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_363() + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_364() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140912,7 +140971,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableCharString_364() + CHIP_ERROR TestWriteAttributeNullableCharString_365() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140937,7 +140996,7 @@ class TestCluster : public TestCommandBridge { } NSString * _Nullable nullableCharStringSave; - CHIP_ERROR TestReadAttributeNullableCharString_365() + CHIP_ERROR TestReadAttributeNullableCharString_366() { MTRBaseDevice * device = GetDevice("alpha"); @@ -140968,7 +141027,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableCharString_366() + CHIP_ERROR TestReadAttributeNullableCharString_367() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141000,7 +141059,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_367() + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_368() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141024,7 +141083,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableCharString_368() + CHIP_ERROR TestReadAttributeNullableCharString_369() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141051,7 +141110,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_369() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_370() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141075,7 +141134,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableCharString_370() + CHIP_ERROR TestReadAttributeNullableCharString_371() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141103,7 +141162,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeNullableCharStringNott_371() + CHIP_ERROR TestReadAttributeNullableCharStringNott_372() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141129,7 +141188,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_372() + CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_373() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141150,7 +141209,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeFromNonexistentCluster_373() + CHIP_ERROR TestReadAttributeFromNonexistentCluster_374() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141171,7 +141230,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_374() + CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_375() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141194,7 +141253,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_375() + CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_376() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141219,11 +141278,11 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - bool testSendClusterTestCluster_376_WaitForReport_Fulfilled = false; + bool testSendClusterTestCluster_377_WaitForReport_Fulfilled = false; ResponseHandler _Nullable test_TestCluster_list_int8u_Reported = nil; - CHIP_ERROR TestReportSubscribeToListAttribute_376() + CHIP_ERROR TestReportSubscribeToListAttribute_377() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141249,14 +141308,14 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[3], 4U)); } - testSendClusterTestCluster_376_WaitForReport_Fulfilled = true; + testSendClusterTestCluster_377_WaitForReport_Fulfilled = true; }; NextTest(); return CHIP_NO_ERROR; } - CHIP_ERROR TestSubscribeToListAttribute_377() + CHIP_ERROR TestSubscribeToListAttribute_378() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141270,7 +141329,7 @@ class TestCluster : public TestCommandBridge { params.replaceExistingSubscriptions = true; [cluster subscribeAttributeListInt8uWithParams:params subscriptionEstablished:^{ - VerifyOrReturn(testSendClusterTestCluster_376_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(testSendClusterTestCluster_377_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); NextTest(); } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -141293,7 +141352,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteSubscribedToListAttribute_378() + CHIP_ERROR TestWriteSubscribedToListAttribute_379() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141328,7 +141387,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckForListAttributeReport_379() + CHIP_ERROR TestCheckForListAttributeReport_380() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141360,7 +141419,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_380() + CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_381() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141387,7 +141446,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_381() + CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_382() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141411,7 +141470,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_382() + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_383() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141435,7 +141494,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_383() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_384() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141459,7 +141518,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_384() + CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_385() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141483,7 +141542,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_385() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_386() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141510,7 +141569,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_386() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_387() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141535,7 +141594,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_387() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_388() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141562,7 +141621,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_388() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_389() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141587,7 +141646,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_389() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_390() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141614,7 +141673,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_390() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_391() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141639,7 +141698,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_391() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_392() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141666,7 +141725,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_392() + CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_393() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141693,7 +141752,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_393() + CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_394() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141717,7 +141776,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_394() + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_395() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141741,7 +141800,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_395() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_396() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141765,7 +141824,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_396() + CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_397() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141789,7 +141848,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_397() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_398() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141816,7 +141875,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_398() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_399() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141841,7 +141900,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_399() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_400() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141868,7 +141927,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_400() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_401() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141893,7 +141952,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_401() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_402() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141920,7 +141979,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_402() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_403() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141945,7 +142004,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_403() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_404() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141972,7 +142031,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_404() + CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_405() { MTRBaseDevice * device = GetDevice("alpha"); @@ -141999,7 +142058,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_405() + CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_406() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142023,7 +142082,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_406() + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_407() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142047,7 +142106,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_407() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_408() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142071,7 +142130,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_408() + CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_409() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142095,7 +142154,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_409() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_410() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142122,7 +142181,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_410() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_411() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142147,7 +142206,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_411() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_412() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142174,7 +142233,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_412() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_413() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142199,7 +142258,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_413() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_414() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142226,7 +142285,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_414() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_415() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142251,7 +142310,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_415() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_416() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142278,7 +142337,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_416() + CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_417() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142305,7 +142364,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_417() + CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_418() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142329,7 +142388,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_418() + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_419() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142353,7 +142412,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_419() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_420() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142377,7 +142436,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_420() + CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_421() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142401,7 +142460,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_421() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_422() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142428,7 +142487,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_422() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_423() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142453,7 +142512,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_423() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_424() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142480,7 +142539,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_424() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_425() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142505,7 +142564,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_425() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_426() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142532,7 +142591,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_426() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_427() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142557,7 +142616,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_427() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_428() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142584,7 +142643,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_428() + CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_429() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142612,7 +142671,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_429() + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_430() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142636,7 +142695,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_430() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_431() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142660,7 +142719,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_431() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_432() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142684,7 +142743,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_432() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_433() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142708,7 +142767,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_433() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_434() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142736,7 +142795,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_434() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_435() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142761,7 +142820,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_435() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_436() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142789,7 +142848,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_436() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_437() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142814,7 +142873,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_437() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_438() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142842,7 +142901,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_438() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_439() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142867,7 +142926,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_439() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_440() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142895,7 +142954,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_440() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_441() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142919,7 +142978,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_441() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_442() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142946,7 +143005,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_442() + CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_443() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142974,7 +143033,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_443() + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_444() { MTRBaseDevice * device = GetDevice("alpha"); @@ -142998,7 +143057,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_444() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_445() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143022,7 +143081,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_445() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_446() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143046,7 +143105,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_446() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_447() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143070,7 +143129,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_447() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_448() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143098,7 +143157,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_448() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_449() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143123,7 +143182,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_449() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_450() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143151,7 +143210,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_450() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_451() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143176,7 +143235,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_451() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_452() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143204,7 +143263,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_452() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_453() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143229,7 +143288,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_453() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_454() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143257,7 +143316,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_454() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_455() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143281,7 +143340,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_455() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_456() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143308,7 +143367,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_456() + CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_457() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143336,7 +143395,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_457() + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_458() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143360,7 +143419,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_458() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_459() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143384,7 +143443,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_459() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_460() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143408,7 +143467,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_460() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_461() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143432,7 +143491,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_461() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_462() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143460,7 +143519,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_462() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_463() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143485,7 +143544,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_463() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_464() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143513,7 +143572,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_464() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_465() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143538,7 +143597,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_465() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_466() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143566,7 +143625,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_466() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_467() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143591,7 +143650,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_467() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_468() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143619,7 +143678,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_468() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_469() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143643,7 +143702,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_469() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_470() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143670,7 +143729,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_470() + CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_471() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143698,7 +143757,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_471() + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_472() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143722,7 +143781,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_472() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_473() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143746,7 +143805,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_473() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_474() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143770,7 +143829,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_474() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_475() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143794,7 +143853,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_475() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_476() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143822,7 +143881,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_476() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_477() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143847,7 +143906,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_477() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_478() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143875,7 +143934,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_478() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_479() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143900,7 +143959,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_479() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_480() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143928,7 +143987,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_480() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_481() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143953,7 +144012,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_481() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_482() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143981,7 +144040,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_482() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_483() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144005,7 +144064,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_483() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_484() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144032,7 +144091,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeThatReturnsGeneralStatusOnWrite_484() + CHIP_ERROR TestWriteAttributeThatReturnsGeneralStatusOnWrite_485() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144056,7 +144115,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_485() + CHIP_ERROR TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_486() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144080,7 +144139,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeThatReturnsGeneralStatusOnRead_486() + CHIP_ERROR TestReadAttributeThatReturnsGeneralStatusOnRead_487() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144101,7 +144160,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeThatReturnsClusterSpecificStatusOnRead_487() + CHIP_ERROR TestReadAttributeThatReturnsClusterSpecificStatusOnRead_488() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144122,7 +144181,59 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAcceptedCommandListAttribute_488() + CHIP_ERROR TestWriteDifferentVendorMeiAttribute_489() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id meiInt8uArgument; + meiInt8uArgument = + [NSNumber numberWithUnsignedChar:201U]; + [cluster writeAttributeMeiInt8uWithValue:meiInt8uArgument completion:^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Write different vendor MEI attribute: Error: %@", err); + } else { + NSLog(@"Write different vendor MEI attribute: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyDifferentVendorMeiAttribute_490() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeiInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Verify different vendor MEI attribute: Error: %@", err); + } else { + NSLog(@"Verify different vendor MEI attribute: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("mei_int8u", actualValue, 201U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestValidateAcceptedCommandListAttribute_491() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144131,16 +144242,16 @@ class TestCluster : public TestCommandBridge { [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"read AcceptedCommandList attribute: Error: %@", err); + NSLog(@"Validate AcceptedCommandList attribute: Error: %@", err); } else { - NSLog(@"read AcceptedCommandList attribute: Success"); + NSLog(@"Validate AcceptedCommandList attribute: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(20))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(21))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); @@ -144161,6 +144272,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[17], 21UL)); VerifyOrReturn(CheckValue("", actualValue[18], 22UL)); VerifyOrReturn(CheckValue("", actualValue[19], 23UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 4294049962UL)); } NextTest(); @@ -144169,7 +144281,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGeneratedCommandListAttribute_489() + CHIP_ERROR TestValidateGeneratedCommandListAttribute_492() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144178,16 +144290,16 @@ class TestCluster : public TestCommandBridge { [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"read GeneratedCommandList attribute: Error: %@", err); + NSLog(@"Validate GeneratedCommandList attribute: Error: %@", err); } else { - NSLog(@"read GeneratedCommandList attribute: Success"); + NSLog(@"Validate GeneratedCommandList attribute: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(10))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(11))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 4UL)); @@ -144198,15 +144310,40 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[7], 10UL)); VerifyOrReturn(CheckValue("", actualValue[8], 11UL)); VerifyOrReturn(CheckValue("", actualValue[9], 12UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 4294049979UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestValidatePresenceOfMeiAttribute_493() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Validate presence of MEI attribute: Error: %@", err); + } else { + NSLog(@"Validate presence of MEI attribute: Success"); } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4294070017UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteStructTypedAttribute_490() + CHIP_ERROR TestWriteStructTypedAttribute_494() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144246,7 +144383,7 @@ class TestCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadStructTypedAttribute_491() + CHIP_ERROR TestReadStructTypedAttribute_495() { MTRBaseDevice * device = GetDevice("alpha"); From 7f5e208f78847466816cd0544617ab077d3d0bb5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 23 Jan 2024 20:11:50 -0500 Subject: [PATCH 08/45] Add support for pre-encoded things in AttributeAccessInterface. (#31639) * Add support for pre-encoded things in AttributeAccessInterface. * Address review comments. --- src/app/BUILD.gn | 4 + .../FabricScopedPreEncodedValue.cpp | 103 ++++++ .../data-model/FabricScopedPreEncodedValue.h | 58 ++++ src/app/data-model/PreEncodedValue.cpp | 40 +++ src/app/data-model/PreEncodedValue.h | 52 ++++ src/app/tests/TestAttributeValueEncoder.cpp | 294 ++++++++++++++++++ 6 files changed, 551 insertions(+) create mode 100644 src/app/data-model/FabricScopedPreEncodedValue.cpp create mode 100644 src/app/data-model/FabricScopedPreEncodedValue.h create mode 100644 src/app/data-model/PreEncodedValue.cpp create mode 100644 src/app/data-model/PreEncodedValue.h diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 9150bfa7857185..74d01091b8d791 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -201,6 +201,10 @@ static_library("app") { "TimerDelegates.h", "WriteClient.cpp", "WriteHandler.cpp", + "data-model/FabricScopedPreEncodedValue.cpp", + "data-model/FabricScopedPreEncodedValue.h", + "data-model/PreEncodedValue.cpp", + "data-model/PreEncodedValue.h", "reporting/Engine.cpp", "reporting/Engine.h", "reporting/ReportScheduler.h", diff --git a/src/app/data-model/FabricScopedPreEncodedValue.cpp b/src/app/data-model/FabricScopedPreEncodedValue.cpp new file mode 100644 index 00000000000000..30bd9a4f5101bd --- /dev/null +++ b/src/app/data-model/FabricScopedPreEncodedValue.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "FabricScopedPreEncodedValue.h" +#include +#include + +#include + +namespace chip { +namespace app { +namespace DataModel { + +FabricScopedPreEncodedValue::FabricScopedPreEncodedValue(const ByteSpan & aData) : mData(aData) {} + +CHIP_ERROR FabricScopedPreEncodedValue::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aFabricIndex) const +{ + TLV::TLVReader reader; + reader.Init(mData); + + ReturnErrorOnFailure(reader.Next()); + + return aWriter.CopyElement(aTag, reader); +} + +FabricIndex FabricScopedPreEncodedValue::GetFabricIndex() const +{ + TLV::TLVReader reader; + reader.Init(mData); + CHIP_ERROR err = reader.Next(); + if (err != CHIP_NO_ERROR) + { + return kUndefinedFabricIndex; + } + + // We must have a struct here. + if (reader.GetType() != TLV::kTLVType_Structure) + { + return kUndefinedFabricIndex; + } + + TLV::TLVType structType; + err = reader.EnterContainer(structType); + if (err != CHIP_NO_ERROR) + { + return kUndefinedFabricIndex; + } + + // Now look for a single field with the right tag. + std::optional foundFabricIndex; + constexpr TLV::Tag kFabricIndexTag = TLV::ContextTag(254); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (reader.GetTag() != kFabricIndexTag) + { + continue; + } + + if (foundFabricIndex.has_value()) + { + // Two fabric indices? Just give up. Note that this will lead to + // errors encoding our value. + return kUndefinedFabricIndex; + } + + err = reader.Get(foundFabricIndex.emplace()); + if (err != CHIP_NO_ERROR) + { + return kUndefinedFabricIndex; + } + } + + if (err != CHIP_ERROR_END_OF_TLV) + { + return kUndefinedFabricIndex; + } + + err = reader.ExitContainer(structType); + if (err != CHIP_NO_ERROR) + { + return kUndefinedFabricIndex; + } + + return foundFabricIndex.value_or(kUndefinedFabricIndex); +} + +} // namespace DataModel +} // namespace app +} // namespace chip diff --git a/src/app/data-model/FabricScopedPreEncodedValue.h b/src/app/data-model/FabricScopedPreEncodedValue.h new file mode 100644 index 00000000000000..b95b99369c9b45 --- /dev/null +++ b/src/app/data-model/FabricScopedPreEncodedValue.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace DataModel { + +/** + * FabridScopedPreEncodedValue represents the value of a single item in a list + * of fabric-scoped structs that has already been encoded as TLV. To enable + * reading these values successfully, the struct must have the fabric index it + * corresponds to encoded with the right tag. + * + * Note: Fabric-sensitive fields are currently not supported; there is no way to + * specify which fields are fabric-sensitive. + */ +class FabricScopedPreEncodedValue +{ +public: + /** + * The data buffer backing the ByteSpan must outlive the + * FabricScopedPreEncodedValue instance. + */ + FabricScopedPreEncodedValue(const ByteSpan & aData); + + /** + * Encodable object API implementation. + */ + static constexpr bool kIsFabricScoped = true; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aFabricIndex) const; + FabricIndex GetFabricIndex() const; + +private: + const ByteSpan mData; +}; + +} // namespace DataModel +} // namespace app +} // namespace chip diff --git a/src/app/data-model/PreEncodedValue.cpp b/src/app/data-model/PreEncodedValue.cpp new file mode 100644 index 00000000000000..3de3e1c98e8b11 --- /dev/null +++ b/src/app/data-model/PreEncodedValue.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "PreEncodedValue.h" +#include +#include + +namespace chip { +namespace app { +namespace DataModel { + +PreEncodedValue::PreEncodedValue(const ByteSpan & aData) : mData(aData) {} + +CHIP_ERROR PreEncodedValue::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVReader reader; + reader.Init(mData); + + ReturnErrorOnFailure(reader.Next()); + + return aWriter.CopyElement(aTag, reader); +} + +} // namespace DataModel +} // namespace app +} // namespace chip diff --git a/src/app/data-model/PreEncodedValue.h b/src/app/data-model/PreEncodedValue.h new file mode 100644 index 00000000000000..052c3872adc9b9 --- /dev/null +++ b/src/app/data-model/PreEncodedValue.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +namespace chip { +namespace app { +namespace DataModel { + +/** + * PreEncodedValue represents the value of an attribute or the value of a single + * item in a list of non-fabric-scoped structs that has already been + * encoded as TLV. + */ +class PreEncodedValue +{ +public: + /** + * The data buffer backing the ByteSpan must outlive the PreEncodedValue + * instance. + */ + PreEncodedValue(const ByteSpan & aData); + + /** + * Encodable object API implementation. + */ + static constexpr bool kIsFabricScoped = false; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + +private: + const ByteSpan mData; +}; + +} // namespace DataModel +} // namespace app +} // namespace chip diff --git a/src/app/tests/TestAttributeValueEncoder.cpp b/src/app/tests/TestAttributeValueEncoder.cpp index 991f0ab0169307..bd4a59ebec5463 100644 --- a/src/app/tests/TestAttributeValueEncoder.cpp +++ b/src/app/tests/TestAttributeValueEncoder.cpp @@ -25,10 +25,16 @@ #include #include #include +#include +#include +#include +#include #include #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::TLV; @@ -43,6 +49,7 @@ constexpr ClusterId kRandomClusterId = 0xaa; constexpr AttributeId kRandomAttributeId = 0xcc; constexpr DataVersion kRandomDataVersion = 0x99; constexpr FabricIndex kTestFabricIndex = 1; +constexpr TLV::Tag kFabricIndexTag = TLV::ContextTag(254); template struct LimitedTestSetup @@ -553,6 +560,288 @@ void TestEncodeListChunking2(nlTestSuite * aSuite, void * aContext) } } +void TestEncodePreEncoded(nlTestSuite * aSuite, void * aContext) +{ + TestSetup test(aSuite); + + uint8_t buffer[128]; + TLV::TLVWriter writer; + writer.Init(buffer); + // Use a random tag that is not the right tag. + CHIP_ERROR err = writer.PutString(TLV::ProfileTag(0x1234abcd, 0x5678fedc), "hello"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + ByteSpan value(buffer, writer.GetLengthWritten()); + err = test.encoder.Encode(DataModel::PreEncodedValue(value)); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + const uint8_t expected[] = { + // clang-format off + 0x15, 0x36, 0x01, // Test overhead, Start Anonymous struct + Start 1 byte Tag Array + Tag (01) + 0x15, // Start anonymous struct + 0x35, 0x01, // Start 1 byte tag struct + Tag (01) + 0x24, 0x00, 0x99, // Tag (00) Value (1 byte uint) 0x99 (Attribute Version) + 0x37, 0x01, // Start 1 byte tag list + Tag (01) (Attribute Path) + 0x24, 0x02, 0x55, // Tag (02) Value (1 byte uint) 0x55 + 0x24, 0x03, 0xaa, // Tag (03) Value (1 byte uint) 0xaa + 0x24, 0x04, 0xcc, // Tag (04) Value (1 byte uint) 0xcc + 0x18, // End of container + 0x2C, 0x02, 0x05, 0x68, 0x65, 0x6C, 0x6C, 0x6F, // Tag (02) Value "hello", with 1-byte length of 0x05 (Attribute Value) + 0x18, // End of container + 0x18, // End of container + // clang-format on + }; + VERIFY_BUFFER_STATE(aSuite, test, expected); +} + +void TestEncodeListOfPreEncoded(nlTestSuite * aSuite, void * aContext) +{ + TestSetup test(aSuite); + + uint8_t buffers[2][128]; + std::optional values[2]; + + { + TLV::TLVWriter writer; + writer.Init(buffers[0]); + // Use a random tag that is not the right tag. + CHIP_ERROR err = writer.PutString(TLV::ProfileTag(0x1234abcd, 0x5678fedc), "hello"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[0].emplace(ByteSpan(buffers[0], writer.GetLengthWritten())); + } + + { + TLV::TLVWriter writer; + writer.Init(buffers[1]); + // Use a random tag that is not the right tag. + CHIP_ERROR err = writer.PutString(TLV::ProfileTag(0x1234abcd, 0x00010002), "bye"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[1].emplace(ByteSpan(buffers[1], writer.GetLengthWritten())); + } + + CHIP_ERROR err = test.encoder.EncodeList([&values](const auto & encoder) { + for (auto & value : values) + { + ReturnErrorOnFailure(encoder.Encode(value.value())); + } + return CHIP_NO_ERROR; + }); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + const uint8_t expected[] = { + // clang-format off + 0x15, 0x36, 0x01, // Test overhead, Start Anonymous struct + Start 1 byte Tag Array + Tag (01) + 0x15, // Start anonymous struct + 0x35, 0x01, // Start 1 byte tag struct + Tag (01) + 0x24, 0x00, 0x99, // Tag (00) Value (1 byte uint) 0x99 (Attribute Version) + 0x37, 0x01, // Start 1 byte tag list + Tag (01) (Attribute Path) + 0x24, 0x02, 0x55, // Tag (02) Value (1 byte uint) 0x55 + 0x24, 0x03, 0xaa, // Tag (03) Value (1 byte uint) 0xaa + 0x24, 0x04, 0xcc, // Tag (04) Value (1 byte uint) 0xcc + 0x18, // End of container + 0x36, 0x02, // Start 1 byte tag array + Tag (02) (Attribute Value) + 0x0C, 0x05, 0x68, 0x65, 0x6C, 0x6C, 0x6F, // "hello", with 1-byte length of 0x05 + 0x0C, 0x03, 0x62, 0x79, 0x65, // "bye", with 1-byte length of 0x03 + 0x18, // End of array + 0x18, // End of container + 0x18, // End of container + // clang-format on + }; + VERIFY_BUFFER_STATE(aSuite, test, expected); +} + +void TestEncodeListOfFabricScopedPreEncoded(nlTestSuite * aSuite, void * aContext) +{ + TestSetup test(aSuite); + + uint8_t buffers[2][128]; + std::optional values[2]; + + { + TLV::TLVWriter writer; + writer.Init(buffers[0]); + // Use a random tag that is not the right tag. + TLV::TLVType outerContainerType; + CHIP_ERROR err = + writer.StartContainer(TLV::ProfileTag(0x1234abcd, 0x5678fedc), TLV::kTLVType_Structure, outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.PutString(TLV::ContextTag(7), "hello"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Put(kFabricIndexTag, kTestFabricIndex); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.EndContainer(outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[0].emplace(ByteSpan(buffers[0], writer.GetLengthWritten())); + } + + { + TLV::TLVWriter writer; + writer.Init(buffers[1]); + // Use a random tag that is not the right tag. + TLV::TLVType outerContainerType; + CHIP_ERROR err = + writer.StartContainer(TLV::ProfileTag(0x1234abcd, 0x00010002), TLV::kTLVType_Structure, outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.PutString(TLV::ContextTag(7), "bye"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Put(kFabricIndexTag, static_cast(kTestFabricIndex + 1)); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.EndContainer(outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[1].emplace(ByteSpan(buffers[1], writer.GetLengthWritten())); + } + + CHIP_ERROR err = test.encoder.EncodeList([&values](const auto & encoder) { + for (auto & value : values) + { + ReturnErrorOnFailure(encoder.Encode(value.value())); + } + return CHIP_NO_ERROR; + }); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + const uint8_t expected[] = { + // clang-format off + 0x15, 0x36, 0x01, // Test overhead, Start Anonymous struct + Start 1 byte Tag Array + Tag (01) + 0x15, // Start anonymous struct + 0x35, 0x01, // Start 1 byte tag struct + Tag (01) + 0x24, 0x00, 0x99, // Tag (00) Value (1 byte uint) 0x99 (Attribute Version) + 0x37, 0x01, // Start 1 byte tag list + Tag (01) (Attribute Path) + 0x24, 0x02, 0x55, // Tag (02) Value (1 byte uint) 0x55 + 0x24, 0x03, 0xaa, // Tag (03) Value (1 byte uint) 0xaa + 0x24, 0x04, 0xcc, // Tag (04) Value (1 byte uint) 0xcc + 0x18, // End of container + 0x36, 0x02, // Start 1 byte tag array + Tag (02) (Attribute Value) + 0x15, // Start of struct + 0x2C, 0x07, 0x05, 0x68, 0x65, 0x6C, 0x6C, 0x6F, // "hello", with tag 07 and 1-byte length of 0x05 + 0x24, 0xFE, 0x01, // Fabric index, tag 254, value 1 + 0x18, // End of struct + 0x15, // Start of struct + 0x2C, 0x07, 0x03, 0x62, 0x79, 0x65, // "bye", with tag 07 and 1-byte length of 0x03 + 0x24, 0xFE, 0x02, // Fabric index, tag 254, value 2 + 0x18, // End of struct + 0x18, // End of array + 0x18, // End of container + 0x18, // End of container + // clang-format on + }; + VERIFY_BUFFER_STATE(aSuite, test, expected); +} + +void TestEncodeFabricFilteredListOfPreEncoded(nlTestSuite * aSuite, void * aContext) +{ + TestSetup test(aSuite, kTestFabricIndex); + + uint8_t buffers[2][128]; + std::optional values[2]; + + { + TLV::TLVWriter writer; + writer.Init(buffers[0]); + // Use a random tag that is not the right tag. + TLV::TLVType outerContainerType; + CHIP_ERROR err = + writer.StartContainer(TLV::ProfileTag(0x1234abcd, 0x5678fedc), TLV::kTLVType_Structure, outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.PutString(TLV::ContextTag(7), "hello"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Put(kFabricIndexTag, kTestFabricIndex); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.EndContainer(outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[0].emplace(ByteSpan(buffers[0], writer.GetLengthWritten())); + } + + { + TLV::TLVWriter writer; + writer.Init(buffers[1]); + // Use a random tag that is not the right tag. + TLV::TLVType outerContainerType; + CHIP_ERROR err = + writer.StartContainer(TLV::ProfileTag(0x1234abcd, 0x00010002), TLV::kTLVType_Structure, outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.PutString(TLV::ContextTag(7), "bye"); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Put(kFabricIndexTag, static_cast(kTestFabricIndex + 1)); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.EndContainer(outerContainerType); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + err = writer.Finalize(); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + values[1].emplace(ByteSpan(buffers[1], writer.GetLengthWritten())); + } + + CHIP_ERROR err = test.encoder.EncodeList([&values](const auto & encoder) { + for (auto & value : values) + { + ReturnErrorOnFailure(encoder.Encode(value.value())); + } + return CHIP_NO_ERROR; + }); + NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); + + const uint8_t expected[] = { + // clang-format off + 0x15, 0x36, 0x01, // Test overhead, Start Anonymous struct + Start 1 byte Tag Array + Tag (01) + 0x15, // Start anonymous struct + 0x35, 0x01, // Start 1 byte tag struct + Tag (01) + 0x24, 0x00, 0x99, // Tag (00) Value (1 byte uint) 0x99 (Attribute Version) + 0x37, 0x01, // Start 1 byte tag list + Tag (01) (Attribute Path) + 0x24, 0x02, 0x55, // Tag (02) Value (1 byte uint) 0x55 + 0x24, 0x03, 0xaa, // Tag (03) Value (1 byte uint) 0xaa + 0x24, 0x04, 0xcc, // Tag (04) Value (1 byte uint) 0xcc + 0x18, // End of container + 0x36, 0x02, // Start 1 byte tag array + Tag (02) (Attribute Value) + 0x15, // Start of struct + 0x2C, 0x07, 0x05, 0x68, 0x65, 0x6C, 0x6C, 0x6F, // "hello", with tag 07 and 1-byte length of 0x05 + 0x24, 0xFE, 0x01, // Fabric index, tag 254, value 1 + 0x18, // End of struct + // No second struct, because we are doing fabric filtering + 0x18, // End of array + 0x18, // End of container + 0x18, // End of container + // clang-format on + }; + VERIFY_BUFFER_STATE(aSuite, test, expected); +} + #undef VERIFY_BUFFER_STATE } // anonymous namespace @@ -569,6 +858,11 @@ const nlTest sTests[] = { NL_TEST_DEF("TestEncodeListChunking", TestEncodeListChunking), NL_TEST_DEF("TestEncodeListChunking2", TestEncodeListChunking2), NL_TEST_DEF("TestEncodeFabricScoped", TestEncodeFabricScoped), + NL_TEST_DEF("TestEncodePreEncoded", TestEncodePreEncoded), + NL_TEST_DEF("TestEncodeListOfPreEncoded", TestEncodeListOfPreEncoded), + NL_TEST_DEF("TestEncodeListFabricScopedPreEncoded", TestEncodeListOfPreEncoded), + NL_TEST_DEF("TestEncodeListOfFabricScopedPreEncoded", TestEncodeListOfFabricScopedPreEncoded), + NL_TEST_DEF("TestEncodeFabricFilteredListOfPreEncoded", TestEncodeFabricFilteredListOfPreEncoded), NL_TEST_SENTINEL() // clang-format on }; From 8830ec11b638fea33875195cad8f37f074beb03d Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 24 Jan 2024 03:50:03 -0500 Subject: [PATCH 09/45] Docs: Update testing YAML per review comments (#31628) * address review comments * regenerate tables * Docs: Exclude YAML tables from restyler The restyler removes all the newlines that cause the table to render correctly. --- .restyled.yaml | 2 + docs/testing/yaml_pseudocluster.md | 44 +++++++-- docs/testing/yaml_schema.md | 94 +++++++++++++------ .../generate_yaml_doc_tables.py | 4 + 4 files changed, 107 insertions(+), 37 deletions(-) diff --git a/.restyled.yaml b/.restyled.yaml index ddea89227f3727..56ed3061e6e1fa 100644 --- a/.restyled.yaml +++ b/.restyled.yaml @@ -86,6 +86,8 @@ exclude: - "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff. - "docs/ERROR_CODES.md" # generated by scripts, not easy to align tables - "docs/clusters.md" # generated by scripts, not easy to align tables + - "docs/testing/yaml_pseudocluster.md" # generated by scripts, restyler makes the tables render improperly + - "docs/testing/yaml_schema.md" # generated by scripts, restyler makes the tables render improperly changed_paths: maximum: 100000 diff --git a/docs/testing/yaml_pseudocluster.md b/docs/testing/yaml_pseudocluster.md index d6296e986d7934..49946187aa39b9 100644 --- a/docs/testing/yaml_pseudocluster.md +++ b/docs/testing/yaml_pseudocluster.md @@ -6,45 +6,69 @@ Script: generate_pseudo_cluster_doc_tables.py # YAML Pseudo-clusters -CommissionerCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| + + +CommissionerCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| |PairWithCode|nodeId
payload
discoverOnce|node_id
char_string
boolean|false
false
true| -|Unpair|nodeId|node_id|false| |GetCommissionerNodeId|||| +|Unpair|nodeId|node_id|false| +|GetCommissionerNodeId|||| |GetCommissionerNodeIdResponse|nodeId|node_id|false| |GetCommissionerRootCertificate|||| |GetCommissionerRootCertificateResponse|RCAC|OCTET_STRING|false| |IssueNocChain|Elements
nodeId|octet_string
node_id|false
false| |IssueNocChainResponse|NOC
ICAC
RCAC
IPK|octet_string
octet_string
octet_string
octet_string|false
false
false
false| -DelayCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| + +DelayCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| |WaitForCommissioning|||| |WaitForCommissionee|nodeId
expireExistingSession|node_id
bool|false
true| |WaitForMs|ms|int16u|false| |WaitForMessage|registerKey
message|char_string
char_string|false
false| -DiscoveryCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| + +DiscoveryCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| |FindCommissionable|||| |FindCommissionableByShortDiscriminator|value|int16u|false| |FindCommissionableByLongDiscriminator|value|int16u|false| |FindCommissionableByCommissioningMode|||| |FindCommissionableByVendorId|value|vendor_id|false| -|FindCommissionableByDeviceType|value|devtype_id|false| |FindCommissioner|||| +|FindCommissionableByDeviceType|value|devtype_id|false| +|FindCommissioner|||| |FindCommissionerByVendorId|value|vendor_id|false| |FindCommissionerByDeviceType|value|devtype_id|false| |FindResponse|hostName
instanceName
longDiscriminator
shortDiscriminator
vendorId
productId
commissioningMode
deviceType
deviceName
rotatingId
rotatingIdLen
pairingHint
pairingInstruction
supportsTcp
numIPs
port
mrpRetryIntervalIdle
mrpRetryIntervalActive
mrpRetryActiveThreshold
isICDOperatingAsLIT|char_string
char_string
int16u
int16u
vendor_id
int16u
int8u
devtype_id
char_string
octet_string
int64u
int16u
char_string
boolean
int8u
int16u
int32u
int32u
int16u
boolean|false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
true
true
true
true| -EqualityCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| + +EqualityCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| |BooleanEquals|Value1
Value2|boolean
boolean|false
false| |SignedNumberEquals|Value1
Value2|int64s
int64s|false
false| |UnsignedNumberEquals|Value1
Value2|int64u
int64u|false
false| |EqualityResponse|Equals|bool|false| -LogCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| + +LogCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| |Log|message|char_string|false| |UserPrompt|message
expectedValue|char_string
char_string|false
true| -SystemCommands |command|args|arg type| arg optional| |:---|:---|:---|:---| -|Start|registerKey
discriminator
port
minCommissioningTimeout
kvs
filepath
otaDownloadPath|char_string
int16u
int16u
int16u
char_string
char_string
char_string|true
true
true
true
true
true
true| -|Stop|registerKey|char_string|true| |Reboot|registerKey|char_string|true| + +SystemCommands +|command|args|arg type| arg optional| +|:---|:---|:---|:---| +|Start|registerKey
discriminator
port
minCommissioningTimeout
kvs
filepath
otaDownloadPath
endUserSupportLogPath
networkDiagnosticsLogPath
crashLogPath|char_string
int16u
int16u
int16u
char_string
char_string
char_string
char_string
char_string
char_string|true
true
true
true
true
true
true
true
true
true| +|Stop|registerKey|char_string|true| +|Reboot|registerKey|char_string|true| |FactoryReset|registerKey|char_string|true| |CreateOtaImage|otaImageFilePath
rawImageFilePath
rawImageContent|char_string
char_string
char_string|false
false
false| |CompareFiles|file1
file2|char_string
char_string|false
false| +|CreateFile|filePath
fileContent|char_string
char_string|false
false| +|DeleteFile|filePath|char_string|false| diff --git a/docs/testing/yaml_schema.md b/docs/testing/yaml_schema.md index 9a3ee96fa2959b..8a4846bde5e4f1 100644 --- a/docs/testing/yaml_schema.md +++ b/docs/testing/yaml_schema.md @@ -6,30 +6,70 @@ Script: generate_yaml_doc_tables.py # YAML Schema -YAML schema |key | type| supports variables |:---|:---|:---| |name |str|| |PICS -|str,list|| |config | | | |  nodeId |int|| |  cluster |str|| |  -endpoint |int|| |  _variableName_ | | | |    type |type|| |  -  defaultValue |Any|| |tests | | | |  label |str|| |  identity -|str|| |  nodeId |int|Y| |  runIf |str|| |  groupId |int|Y| -|  endpoint |int|Y| |  cluster |str|| |  attribute |str|| |  -command |str|| |  event |str|| |  eventNumber |int|Y| |  disabled -|bool|| |  fabricFiltered |bool|| |  verification |str|| |  PICS -|str|| |  arguments | | | |    values | | | |      -value |NoneType,bool,int,float,dict,list|Y| |      name |str|| -|    value |NoneType,bool,int,float,dict,list|Y| |  response | |Y -| |    value |NoneType,bool,int,float,dict,list|Y| |    name -|str|| |    error |str|| |    clusterError |int|| |  -  constraints | | | |      hasValue |bool|| |    -  type |str|| |      minLength |int|| |      -maxLength |int|| |      isHexString |bool|| |      -startsWith |str|| |      endsWith |str|| |      -isUpperCase |bool|| |      isLowerCase |bool|| |    -  minValue |int,float|Y| |      maxValue |int,float|Y| -|      contains |list|| |      excludes |list|| -|      hasMasksSet |list|| |      hasMasksClear -|list|| |      notValue |NoneType,bool,int,float,list,dict|Y| -|      anyOf |list|| |    saveAs |str|| |    -saveDataVersschemaionAs |str|| |  saveResponseAs |str|| |  minInterval -|int|| |  maxInterval |int|| |  keepSubscriptions |bool|| |  -timeout |int|| |  timedInteractionTimeoutMs |int|| |  dataVersion -|list,int|Y| |  busyWaitMs |int|| |  wait |str|| +YAML schema +|key | type| supports variables +|:---|:---|:---| +|name |str|| +|PICS |str,list|| +|config | | | +|  nodeId |int|| +|  cluster |str|| +|  endpoint |int|| +|  _variableName_ | | | +|    type |type|| +|    defaultValue |Any|| +|tests | | | +|  label |str|| +|  identity |str|| +|  nodeId |int|Y| +|  runIf |str|| +|  groupId |int|Y| +|  endpoint |int|Y| +|  cluster |str|| +|  attribute |str|| +|  command |str|| +|  event |str|| +|  eventNumber |int|Y| +|  disabled |bool|| +|  fabricFiltered |bool|| +|  verification |str|| +|  PICS |str|| +|  arguments | | | +|    values | | | +|      value |NoneType,bool,int,float,dict,list|Y| +|      name |str|| +|    value |NoneType,bool,int,float,dict,list|Y| +|  response | |Y | +|    value |NoneType,bool,int,float,dict,list|Y| +|    name |str|| +|    error |str|| +|    clusterError |int|| +|    constraints | | | +|      hasValue |bool|| +|      type |str|| +|      minLength |int|| +|      maxLength |int|| +|      isHexString |bool|| +|      startsWith |str|| +|      endsWith |str|| +|      isUpperCase |bool|| +|      isLowerCase |bool|| +|      minValue |int,float|Y| +|      maxValue |int,float|Y| +|      contains |list|| +|      excludes |list|| +|      hasMasksSet |list|| +|      hasMasksClear |list|| +|      notValue |NoneType,bool,int,float,list,dict|Y| +|      anyOf |list|| +|    saveAs |str|| +|    saveDataVersschemaionAs |str|| +|  saveResponseAs |str|| +|  minInterval |int|| +|  maxInterval |int|| +|  keepSubscriptions |bool|| +|  timeout |int|| +|  timedInteractionTimeoutMs |int|| +|  dataVersion |list,int|Y| +|  busyWaitMs |int|| +|  wait |str|| diff --git a/scripts/py_matter_yamltests/generate_yaml_doc_tables.py b/scripts/py_matter_yamltests/generate_yaml_doc_tables.py index 4deb3abe00c09c..4de5f66efdc035 100644 --- a/scripts/py_matter_yamltests/generate_yaml_doc_tables.py +++ b/scripts/py_matter_yamltests/generate_yaml_doc_tables.py @@ -26,12 +26,16 @@ def get_type_list_and_vars(typetuple) -> (list[type], bool): + "Returns a list of supported types for this type tuple and a bool indicating if variables are supported." # If str is one of the supported types, and other base types are supported, # this means it supports variables. # This is a heuristic, but it's true for now. try: typelist = list(typetuple) if str in typelist: + # The tuple passed from the yaml parser is a tuple of type classes + # Here, we directly compare to the base type because that's what + # we get from the parser (ex. (bool, int, str)) reduced = [t for t in typelist if t != str] if reduced != [list]: return (reduced, True) From a386c8339f9e5b388ae8464368308f5b5998669e Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 24 Jan 2024 22:46:35 +1300 Subject: [PATCH 10/45] Darwin: Re-enable TAPI and change symbol visibility management (#31166) * Darwin: Re-enable TAPI and change symbol visibility management Symbols are now hidden by default, but anything annotated with API availability (or deprecation, since that implies previous availability) is exported. Also add missing API availability to a number of classes that were introduced in the initial release. * Remove MTR_HIDDEN to avoid duplicate visibility attributes * Comment tweak * Re-add missing MTR_EXTERN * Make MTR_PER_CONTROLLER_STORAGE_ENABLED=0 work * restyle * Build MatterTests and dft with MTR_NO_AVAILABILITY=1 --- src/darwin/Framework/CHIP/MTRBaseDevice.h | 66 ++++++++------- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 1 - src/darwin/Framework/CHIP/MTRCertificates.h | 1 + src/darwin/Framework/CHIP/MTRCluster.h | 4 + .../Framework/CHIP/MTRCommandTimedCheck.h | 4 +- .../Framework/CHIP/MTRCommissionableBrowser.h | 1 - .../MTRCommissionableBrowserResult_Internal.h | 1 - .../CHIP/MTRCommissioningParameters.h | 1 + src/darwin/Framework/CHIP/MTRDefines.h | 84 ++++++++++++------- .../Framework/CHIP/MTRDefines_Internal.h | 2 +- src/darwin/Framework/CHIP/MTRDevice.h | 1 + src/darwin/Framework/CHIP/MTRDevice.mm | 1 - .../CHIP/MTRDeviceAttestationDelegate.h | 4 +- .../Framework/CHIP/MTRDeviceController.h | 1 + .../Framework/CHIP/MTRDeviceController.mm | 2 - .../CHIP/MTRDeviceControllerDataStore.h | 2 - .../CHIP/MTRDeviceControllerFactory.mm | 1 - .../CHIP/MTRDeviceControllerOverXPC.h | 1 - .../CHIP/MTRDeviceControllerParameters.h | 16 ++-- .../CHIP/MTRDeviceControllerStartupParams.h | 1 + ...TRDeviceControllerStartupParams_Internal.h | 1 - .../CHIP/MTRDeviceControllerStorageDelegate.h | 11 +-- .../CHIP/MTRDeviceControllerXPCConnection.h | 2 - src/darwin/Framework/CHIP/MTRDeviceOverXPC.h | 1 - src/darwin/Framework/CHIP/MTRError.h | 4 +- src/darwin/Framework/CHIP/MTRError.mm | 1 - src/darwin/Framework/CHIP/MTRError_Internal.h | 1 - src/darwin/Framework/CHIP/MTROTAHeader.h | 3 +- src/darwin/Framework/CHIP/MTRSetupPayload.h | 2 + .../CHIP/MTRThreadOperationalDataset.h | 13 +-- .../CHIPTests/MTRSwiftDeviceTests.swift | 10 --- .../CHIPTests/MTRSwiftPairingTests.swift | 10 --- .../Matter.xcodeproj/project.pbxproj | 79 +++++++++-------- 33 files changed, 174 insertions(+), 159 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index 5371dd22962ab4..64c8fd99981595 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -121,30 +121,30 @@ typedef void (^MTRDeviceResubscriptionScheduledHandler)(NSError * error, NSNumbe MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) typedef void (^MTRDeviceOpenCommissioningWindowHandler)(MTRSetupPayload * _Nullable payload, NSError * _Nullable error); -extern NSString * const MTRAttributePathKey; -extern NSString * const MTRCommandPathKey; -extern NSString * const MTREventPathKey; -extern NSString * const MTRDataKey; -extern NSString * const MTRErrorKey; -extern NSString * const MTRTypeKey; -extern NSString * const MTRValueKey; -extern NSString * const MTRContextTagKey; -extern NSString * const MTRSignedIntegerValueType; -extern NSString * const MTRUnsignedIntegerValueType; -extern NSString * const MTRBooleanValueType; -extern NSString * const MTRUTF8StringValueType; -extern NSString * const MTROctetStringValueType; -extern NSString * const MTRFloatValueType; -extern NSString * const MTRDoubleValueType; -extern NSString * const MTRNullValueType; -extern NSString * const MTRStructureValueType; -extern NSString * const MTRArrayValueType; -extern NSString * const MTREventNumberKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -extern NSString * const MTREventPriorityKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -extern NSString * const MTREventTimeTypeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -extern NSString * const MTREventSystemUpTimeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -extern NSString * const MTREventTimestampDateKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -extern NSString * const MTREventIsHistoricalKey MTR_AVAILABLE(ios(17.3), macos(14.3), watchos(10.3), tvos(17.3)); +MTR_EXTERN NSString * const MTRAttributePathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRCommandPathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTREventPathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRDataKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRErrorKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRTypeKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRValueKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRContextTagKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRSignedIntegerValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRUnsignedIntegerValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRBooleanValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRUTF8StringValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTROctetStringValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRFloatValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRDoubleValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRNullValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRStructureValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTRArrayValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSString * const MTREventNumberKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_EXTERN NSString * const MTREventPriorityKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_EXTERN NSString * const MTREventTimeTypeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_EXTERN NSString * const MTREventSystemUpTimeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_EXTERN NSString * const MTREventTimestampDateKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_EXTERN NSString * const MTREventIsHistoricalKey MTR_AVAILABLE(ios(17.3), macos(14.3), watchos(10.3), tvos(17.3)); @class MTRClusterStateCacheContainer; @class MTRAttributeCacheContainer; @@ -165,8 +165,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { */ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRAttributeRequestPath : NSObject -@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) - ; +@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * attribute MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -184,8 +183,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) */ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTREventRequestPath : NSObject -@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) - ; +@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * event MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -195,6 +193,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRBaseDevice : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -551,6 +550,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) */ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRClusterPath : NSObject + @property (nonatomic, readonly, copy) NSNumber * endpoint; @property (nonatomic, readonly, copy) NSNumber * cluster; @@ -564,7 +564,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * A path indicating a specific attribute on a device (i.e. without any * wildcards). */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRAttributePath : MTRClusterPath + @property (nonatomic, readonly, copy) NSNumber * attribute; + (MTRAttributePath *)attributePathWithEndpointID:(NSNumber *)endpointID @@ -578,7 +580,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * (i.e. without any wildcards). There can be multiple instances of actual * events for a given event path. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTREventPath : MTRClusterPath + @property (nonatomic, readonly, copy) NSNumber * event; + (MTREventPath *)eventPathWithEndpointID:(NSNumber *)endpointID @@ -590,7 +594,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * A path indicating a specific command on a device (i.e. without any * wildcards). */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRCommandPath : MTRClusterPath + @property (nonatomic, readonly, copy) NSNumber * command; + (MTRCommandPath *)commandPathWithEndpointID:(NSNumber *)endpointID @@ -598,7 +604,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) commandID:(NSNumber *)commandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @end +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRAttributeReport : NSObject + @property (nonatomic, readonly, copy) MTRAttributePath * path; /** @@ -665,7 +673,9 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) { MTREventPriorityCritical = 2 } MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTREventReport : NSObject + @property (nonatomic, readonly, copy) MTREventPath * path; /** diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 626480db8e0a8e..77b3e0160f68a3 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -90,7 +90,6 @@ class MTRDataValueDictionaryCallbackBridge; -MTR_HIDDEN @interface MTRReadClientContainer : NSObject @property (nonatomic, readwrite) app::ReadClient * readClientPtr; @property (nonatomic, readwrite) app::AttributePathParams * pathParams; diff --git a/src/darwin/Framework/CHIP/MTRCertificates.h b/src/darwin/Framework/CHIP/MTRCertificates.h index 67b3cebef895bf..d414ca760117c0 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.h +++ b/src/darwin/Framework/CHIP/MTRCertificates.h @@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRCertificates : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index 2c2dcca175754d..f1863bbc05bc95 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -37,6 +37,7 @@ NS_ASSUME_NONNULL_BEGIN * MTRCluster * This is the base class for clusters. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRCluster : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -71,6 +72,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * If not provided (i.e. nil passed for the CHIPWriteParams argument), will be * treated as if a default-initialized object was passed in. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRWriteParams : NSObject /** @@ -106,6 +108,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * If not provided (i.e. nil passed for the MTRReadParams argument), will be * treated as if a default-initialized object was passed in. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRReadParams : NSObject /** @@ -137,6 +140,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * provided (i.e. nil passed for the MTRSubscribeParams argument), will be * treated as if a default-initialized object was passed in. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRSubscribeParams : MTRReadParams /** diff --git a/src/darwin/Framework/CHIP/MTRCommandTimedCheck.h b/src/darwin/Framework/CHIP/MTRCommandTimedCheck.h index 423a133d93dcc7..ba72bf99960311 100644 --- a/src/darwin/Framework/CHIP/MTRCommandTimedCheck.h +++ b/src/darwin/Framework/CHIP/MTRCommandTimedCheck.h @@ -15,9 +15,7 @@ * limitations under the License. */ -#pragma once - -#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h index 1a05c13a59021a..52d0bc875464f0 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h @@ -23,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRCommissionableBrowserDelegate; @class MTRDeviceController; -MTR_HIDDEN @interface MTRCommissionableBrowser : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h index bf312d83361117..4500ab8eb877f2 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h @@ -24,7 +24,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRCommissionableBrowserResultInterfaces : NSObject @property (nonatomic, readwrite) chip::Optional resolutionData; diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index a6568dae900f69..771dfe54fc8893 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Information that can be provided to commissionWithNodeID to commision devices. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRCommissioningParameters : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 232a97f33dd7c9..fea32d4a0e076e 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -17,12 +17,39 @@ #import +#pragma mark - Overridable options + +/** + * @define `MTR_NO_AVAILABILITY` + * Turns off availability annotations, to allow compiling a version of + * Matter.framework for "local use", not as a system framework. + */ +#ifndef MTR_NO_AVAILABILITY +#define MTR_NO_AVAILABILITY 0 +#endif + +/** + * @define `MTR_ENABLE_PROVISIONAL` + * Makes provisional spec features available for evaluation / testing purposes. + * The usual API / ABI stability guarantees DO NOT APPLY to provisional features. + */ +#ifndef MTR_ENABLE_PROVISIONAL +#define MTR_ENABLE_PROVISIONAL 0 +#endif + +/** + * @define `MTR_ENABLE_UNSTABLE_API` + * Makes unstbale APIs available for evaluation / testing purposes. + * The usual API / ABI stability guarantees DO NOT APPLY to unstable APIs. + */ +#ifndef MTR_ENABLE_UNSTABLE_API +#define MTR_ENABLE_UNSTABLE_API 0 +#endif + #pragma mark - Attribute macros #define MTR_EXPORT __attribute__((visibility("default"))) -#define MTR_HIDDEN __attribute__((visibility("hidden"))) - #ifdef __cplusplus #define MTR_EXTERN extern "C" MTR_EXPORT #else @@ -35,51 +62,44 @@ #define MTR_SWIFT_DISFAVORED_OVERLOAD #endif -#pragma mark - Deprecation macros (can be overriden via build system) +#pragma mark - Availability / deprecation -/** - * MTR_NO_AVAILABILITY can be used to turn off availability - * annotations, to allow compiling a version of Matter.framework for "local - * use", not as a system framework. - */ -#if !defined(MTR_NO_AVAILABILITY) -#define MTR_NO_AVAILABILITY 0 -#endif +// clang-format off +#define _MTR_IMPLICIT_EXPORT \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wignored-attributes\"")\ + MTR_EXPORT \ + _Pragma("clang diagnostic pop") +// clang-format on +#define _MTR_DEPRECATED _MTR_IMPLICIT_EXPORT MTR_SWIFT_DISFAVORED_OVERLOAD +#define _MTR_UNAVAILABLE _MTR_IMPLICIT_EXPORT NS_UNAVAILABLE + +// clang-format off #if MTR_NO_AVAILABILITY -#define MTR_DEPRECATED(...) MTR_SWIFT_DISFAVORED_OVERLOAD -#define MTR_DEPRECATED_WITH_REPLACEMENT(...) MTR_SWIFT_DISFAVORED_OVERLOAD -#define MTR_AVAILABLE(...) +#define MTR_DEPRECATED(...) _MTR_DEPRECATED +#define MTR_DEPRECATED_WITH_REPLACEMENT(...) _MTR_DEPRECATED +#define MTR_AVAILABLE(...) _MTR_IMPLICIT_EXPORT #else -#define MTR_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__) MTR_SWIFT_DISFAVORED_OVERLOAD -#define MTR_DEPRECATED_WITH_REPLACEMENT(...) API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) MTR_SWIFT_DISFAVORED_OVERLOAD -#define MTR_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) +#define MTR_DEPRECATED(...) _MTR_DEPRECATED API_DEPRECATED(__VA_ARGS__) +#define MTR_DEPRECATED_WITH_REPLACEMENT(...) _MTR_DEPRECATED API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) +#define MTR_AVAILABLE(...) _MTR_IMPLICIT_EXPORT API_AVAILABLE(__VA_ARGS__) #endif // MTR_NO_AVAILABILITY +// clang-format on -#define MTR_NEWLY_DEPRECATED(message) - -#define MTR_NEWLY_AVAILABLE - -#define MTR_UNAVAILABLE NS_UNAVAILABLE MTR_HIDDEN - -#if !defined(MTR_ENABLE_PROVISIONAL) -#define MTR_ENABLE_PROVISIONAL 0 -#endif +#define MTR_NEWLY_DEPRECATED(message) _MTR_IMPLICIT_EXPORT +#define MTR_NEWLY_AVAILABLE _MTR_IMPLICIT_EXPORT #if MTR_ENABLE_PROVISIONAL #define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE #else -#define MTR_PROVISIONALLY_AVAILABLE MTR_UNAVAILABLE -#endif - -#if !defined(MTR_ENABLE_UNSTABLE_API) -#define MTR_ENABLE_UNSTABLE_API 0 +#define MTR_PROVISIONALLY_AVAILABLE _MTR_UNAVAILABLE #endif #if MTR_ENABLE_UNSTABLE_API #define MTR_UNSTABLE_API MTR_NEWLY_AVAILABLE #else -#define MTR_UNSTABLE_API MTR_UNAVAILABLE +#define MTR_UNSTABLE_API _MTR_UNAVAILABLE #endif #ifndef MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIP/MTRDefines_Internal.h b/src/darwin/Framework/CHIP/MTRDefines_Internal.h index 731ea45d4ce17a..6a684f5f879e04 100644 --- a/src/darwin/Framework/CHIP/MTRDefines_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDefines_Internal.h @@ -31,7 +31,7 @@ #ifdef DEBUG #define MTR_TESTABLE MTR_EXPORT #else -#define MTR_TESTABLE MTR_HIDDEN +#define MTR_TESTABLE #endif // clang-format off diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 21c72cb70f7a65..4627b96beab62d 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -31,6 +31,7 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { @protocol MTRDeviceDelegate; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDevice : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 021d00c64f2e62..909fe065ac39ac 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -48,7 +48,6 @@ // Consider moving utility classes to their own file #pragma mark - Utility Classes // This class is for storing weak references in a container -MTR_HIDDEN @interface MTRWeakReference : NSObject + (instancetype)weakReferenceWithObject:(ObjectType)object; - (instancetype)initWithObject:(ObjectType)object; diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h index 1eab2b22beb8b1..0c3e35e9809548 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @class MTRDeviceController; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDeviceAttestationDeviceInfo : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -51,8 +52,7 @@ NS_ASSUME_NONNULL_BEGIN * used for device attestation. If attestation succeeds, this must match one of * the product IDs from the certification declaration. */ -@property (nonatomic, readonly) NSNumber * basicInformationProductID MTR_AVAILABLE(ios(16.6), macos(13.5), watchos(9.6), tvos(16.6)) - ; +@property (nonatomic, readonly) NSNumber * basicInformationProductID MTR_AVAILABLE(ios(16.6), macos(13.5), watchos(9.6), tvos(16.6)); @property (nonatomic, readonly) MTRCertificateDERBytes dacCertificate; @property (nonatomic, readonly) MTRCertificateDERBytes dacPAICertificate; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index e830f024d8d155..a3757e6353f796 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -38,6 +38,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS @protocol MTRDevicePairingDelegate; @protocol MTRDeviceControllerDelegate; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDeviceController : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index ba3ec1958a42fd..836ea101ff8b1d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -1222,7 +1222,6 @@ - (void)operationalInstanceAdded:(chip::NodeId)nodeID * Shim to allow us to treat an MTRDevicePairingDelegate as an * MTRDeviceControllerDelegate. */ -MTR_HIDDEN @interface MTRDevicePairingDelegateShim : NSObject @property (nonatomic, readonly) id delegate; - (instancetype)initWithDelegate:(id)delegate; @@ -1280,7 +1279,6 @@ - (void)onPairingDeleted:(NSError * _Nullable)error * Shim to allow us to treat an MTRNOCChainIssuer as an * MTROperationalCertificateIssuer. */ -MTR_HIDDEN @interface MTROperationalCertificateChainIssuerShim : NSObject @property (nonatomic, readonly) id nocChainIssuer; @property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h index 3abab9ea48adcc..21adb966b80997 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -30,7 +30,6 @@ NS_ASSUME_NONNULL_BEGIN /** * Interface that represents a single CASE session resumption entry. */ -MTR_HIDDEN @interface MTRCASESessionResumptionInfo : NSObject @property (nonatomic) NSNumber * nodeID; @property (nonatomic) NSData * resumptionID; @@ -42,7 +41,6 @@ MTR_HIDDEN * Interface that wraps a type-safe API around * MTRDeviceControllerStorageDelegate. */ -MTR_HIDDEN @interface MTRDeviceControllerDataStore : NSObject - (nullable instancetype)initWithController:(MTRDeviceController *)controller diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index b87155b0f17b13..717679e233a3be 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -1128,7 +1128,6 @@ - (PersistentStorageDelegate *)storageDelegate @end -MTR_HIDDEN @interface MTRDummyStorage : NSObject @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h index b4c383b6481963..9616e22b7a494c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h @@ -24,7 +24,6 @@ NS_ASSUME_NONNULL_BEGIN typedef NSXPCConnection * _Nonnull (^MTRXPCConnectBlock)(void); -MTR_HIDDEN @interface MTRDeviceControllerOverXPC : MTRDeviceController - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h index b9c72d5598f92b..73369cdf0d1361 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h @@ -14,7 +14,6 @@ * limitations under the License. */ -#import #import #if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER) @@ -33,10 +32,9 @@ NS_ASSUME_NONNULL_BEGIN * interfaces inheriting from this one should be used to actually do the * initialization. */ -#if !MTR_PER_CONTROLLER_STORAGE_ENABLED -MTR_HIDDEN -#endif +#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE +#endif @interface MTRDeviceControllerAbstractParameters : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -46,10 +44,9 @@ MTR_NEWLY_AVAILABLE * Parameters that can be used to initialize an MTRDeviceController which * has a node identity. */ -#if !MTR_PER_CONTROLLER_STORAGE_ENABLED -MTR_HIDDEN -#endif +#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE +#endif @interface MTRDeviceControllerParameters : MTRDeviceControllerAbstractParameters /** @@ -92,10 +89,9 @@ MTR_NEWLY_AVAILABLE @end -#if !MTR_PER_CONTROLLER_STORAGE_ENABLED -MTR_HIDDEN -#endif +#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE +#endif @interface MTRDeviceControllerExternalCertificateParameters : MTRDeviceControllerParameters - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index 76dd5a9c8d5d04..f9cabae78b3418 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDeviceControllerStartupParams : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 71e6a74f5688f3..66ced06e8e1673 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -91,7 +91,6 @@ NS_ASSUME_NONNULL_BEGIN @end -MTR_HIDDEN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h index 2a322eb07f799a..dd8bdd07366498 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h @@ -67,7 +67,9 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { * stored and calling MTRDeviceControllerStorageClasses(), is likely to lead * to deadlocks. */ +#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE +#endif @protocol MTRDeviceControllerStorageDelegate @required /** @@ -113,11 +115,10 @@ MTR_NEWLY_AVAILABLE // TODO: FIXME: Is this a sane place to put this API? #if MTR_PER_CONTROLLER_STORAGE_ENABLED -MTR_EXTERN -#else -MTR_HIDDEN -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED -MTR_NEWLY_AVAILABLE NSSet * MTRDeviceControllerStorageClasses(void); +MTR_EXTERN MTR_NEWLY_AVAILABLE +#endif + NSSet * + MTRDeviceControllerStorageClasses(void); NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h index 0dc4592f2ea981..641413b82c9084 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h @@ -29,7 +29,6 @@ typedef void (^MTRXPCReportHandler)(id _Nullable values, NSError * _Nullable err * Releasing the handle may cause invalidating the XPC connection. Hence, in order to retain the connection, the handle must not be * released. */ -MTR_HIDDEN @interface MTRDeviceControllerXPCProxyHandle : NSObject @property (nonatomic, readonly, getter=proxy) id proxy; @@ -43,7 +42,6 @@ typedef void (^MTRGetProxyHandleHandler)(dispatch_queue_t queue, MTRDeviceContro * * This class is in charge of making a new XPC connection and disconnecting as needed by the clients and by the report handlers. */ -MTR_HIDDEN @interface MTRDeviceControllerXPCConnection : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h index c7da1f211110e0..dadd7b4bf50e88 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h @@ -25,7 +25,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRDeviceOverXPC : MTRBaseDevice - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index 1abc415a35b0d1..a2bea3e5a49e40 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -20,9 +20,9 @@ #import NS_ASSUME_NONNULL_BEGIN -FOUNDATION_EXPORT NSErrorDomain const MTRErrorDomain; -FOUNDATION_EXPORT NSErrorDomain const MTRInteractionErrorDomain; +MTR_EXTERN NSErrorDomain const MTRErrorDomain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN NSErrorDomain const MTRInteractionErrorDomain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * MTRErrorDomain contains errors caused by data processing the framework diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index 8d326a098f3681..9f7c0938b41c61 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -34,7 +34,6 @@ // Class for holding on to a CHIP_ERROR that we can use as the value // in a dictionary. -MTR_HIDDEN @interface MTRErrorHolder : NSObject @property (nonatomic, readonly) CHIP_ERROR error; diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index 8fb49d97f08237..9997118ae95191 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -25,7 +25,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRError : NSObject + (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; + (NSError * _Nullable)errorForIMStatus:(const chip::app::StatusIB &)status; diff --git a/src/darwin/Framework/CHIP/MTROTAHeader.h b/src/darwin/Framework/CHIP/MTROTAHeader.h index 4eb7bbac849f4b..60a2bcabdb1683 100644 --- a/src/darwin/Framework/CHIP/MTROTAHeader.h +++ b/src/darwin/Framework/CHIP/MTROTAHeader.h @@ -37,8 +37,9 @@ typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { MTROTAImageDigestTypeSha3_256, MTROTAImageDigestTypeSha3_384, MTROTAImageDigestTypeSha3_512, -}; +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROTAHeader : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index 267e1d39f05f21..9d6466b9cbdc32 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -50,6 +50,7 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { * An optional information item present in the QR code the setup payload was * initialized from. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROptionalQRCodeInfo : NSObject @property (nonatomic, assign) MTROptionalQRCodeInfoType type MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -74,6 +75,7 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { * creating from numeric code will not work, because some required information * will be missing. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRSetupPayload : NSObject @property (nonatomic, copy) NSNumber * version; diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h index 76cfdbb6b49d4e..2464f54d18070b 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h @@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN * The latter can be used to pass Thread network credentials via * MTRCommissioningParameters. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRThreadOperationalDataset : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -61,13 +62,13 @@ NS_ASSUME_NONNULL_BEGIN /** * The expected lengths of each of the NSData fields in the MTRThreadOperationalDataset */ -extern size_t const MTRSizeThreadNetworkName; -extern size_t const MTRSizeThreadExtendedPanId MTR_DEPRECATED( +MTR_EXTERN size_t const MTRSizeThreadNetworkName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN size_t const MTRSizeThreadExtendedPanId MTR_DEPRECATED( "Please use MTRSizeThreadExtendedPANID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -extern size_t const MTRSizeThreadExtendedPANID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -extern size_t const MTRSizeThreadMasterKey; -extern size_t const MTRSizeThreadPSKc; -extern size_t const MTRSizeThreadPANID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_EXTERN size_t const MTRSizeThreadExtendedPANID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_EXTERN size_t const MTRSizeThreadMasterKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN size_t const MTRSizeThreadPSKc MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_EXTERN size_t const MTRSizeThreadPANID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * The Thread Network name diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift index e33a03d920fa3b..061f093ce9ce79 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift @@ -17,11 +17,6 @@ var sController: MTRDeviceController? = nil var sTestKeys: MTRTestKeys? = nil -// Because we are using things from Matter.framework that are flagged -// as only being available starting with macOS 13.3, we need to flag our -// code with the same availabiluty annotation. -@available(macOS, introduced: 13.3) -@available(iOS, introduced: 16.4) class MTRSwiftDeviceTestControllerDelegate : NSObject, MTRDeviceControllerDelegate { let expectation: XCTestExpectation @@ -97,11 +92,6 @@ class MTRSwiftDeviceTestDelegate : NSObject, MTRDeviceDelegate { } -// Because we are using things from Matter.framework that are flagged -// as only being available starting with macOS 14.4, we need to flag our -// code with the same availability annotation. -@available(macOS, introduced: 14.4) -@available(iOS, introduced: 17.4) class MTRSwiftDeviceTests : XCTestCase { static var sStackInitRan : Bool = false static var sNeedsStackShutdown : Bool = true diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift index 5d88db56277631..001a3fe3150d01 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift @@ -11,11 +11,6 @@ struct PairingConstants { static let timeoutInSeconds : UInt16 = 3 } -// Because we are using things from Matter.framework that are flagged -// as only being available starting with macOS 13.3, we need to flag our -// code with the same availabiluty annotation. -@available(macOS, introduced: 13.3) -@available(iOS, introduced: 16.4) class MTRSwiftPairingTestControllerDelegate : NSObject, MTRDeviceControllerDelegate { let expectation: XCTestExpectation @@ -47,11 +42,6 @@ class MTRSwiftPairingTestControllerDelegate : NSObject, MTRDeviceControllerDeleg } class MTRSwiftPairingTests : XCTestCase { - // Because we are using things from Matter.framework that are flagged - // as only being available starting with macOS 13.3, we need to flag our - // code with the same availabiluty annotation. - @available(macOS, introduced: 13.3) - @available(iOS, introduced: 16.4) func test001_BasicPairing() { let factory = MTRDeviceControllerFactory.sharedInstance() diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index a7f00d50661487..72565dd46f127f 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -1848,11 +1848,13 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", CHIP_HAVE_CONFIG_H, "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=", CONFIG_BUILD_FOR_HOST_UNIT_TEST, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "CONFIG_USE_INTERACTIVE_MODE=1", + "MTR_NO_AVAILABILITY=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples/darwin-framework-tool", @@ -1924,11 +1926,13 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", CHIP_HAVE_CONFIG_H, "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=", CONFIG_BUILD_FOR_HOST_UNIT_TEST, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "CONFIG_USE_INTERACTIVE_MODE=1", + "MTR_NO_AVAILABILITY=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples//darwin-framework-tool", @@ -2032,6 +2036,7 @@ "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -2039,14 +2044,14 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\""; + OTHER_TAPI_FLAGS = "-x objective-c++ -std=gnu++17 -fvisibility=hidden -fobjc-arc"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvos appletvsimulator watchos watchsimulator"; - SUPPORTS_TEXT_BASED_API = NO; + SUPPORTS_TEXT_BASED_API = YES; SWIFT_INSTALL_OBJC_HEADER = NO; + TAPI_ENABLE_PROJECT_HEADERS = YES; TARGETED_DEVICE_FAMILY = "1,2,3,4"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -2076,20 +2081,6 @@ "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "MTR_ENABLE_PROVISIONAL=1", ); - HEADER_SEARCH_PATHS = ( - "$(CHIP_ROOT)/src", - "$(CHIP_ROOT)/src/include", - "$(CHIP_ROOT)/src/lib", - "$(CHIP_ROOT)/src/app", - "$(CHIP_ROOT)/config/ios", - "$(CHIP_ROOT)/third_party/nlassert/repo/include", - "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", - "$(CHIP_ROOT)/src/app/util", - "$(CHIP_ROOT)/third_party/nlio/repo/include", - "$(TEMP_DIR)/out/gen/include", - "$(CHIP_ROOT)/zzz_generated/", - "$(CHIP_ROOT)/zzz_generated/app-common", - ); INFOPLIST_FILE = CHIP/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.4; @@ -2131,6 +2122,20 @@ PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; + SYSTEM_HEADER_SEARCH_PATHS = ( + "$(TEMP_DIR)/out/gen/include", + "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", + "$(CHIP_ROOT)/config/ios", + "$(CHIP_ROOT)/src", + "$(CHIP_ROOT)/src/include", + "$(CHIP_ROOT)/src/lib", + "$(CHIP_ROOT)/src/app", + "$(CHIP_ROOT)/src/app/util", + "$(CHIP_ROOT)/zzz_generated/", + "$(CHIP_ROOT)/zzz_generated/app-common", + "$(CHIP_ROOT)/third_party/nlassert/repo/include", + "$(CHIP_ROOT)/third_party/nlio/repo/include", + ); TAPI_VERIFY_MODE = Pedantic; TARGETED_DEVICE_FAMILY = "1,2,3,4"; VERSION_INFO_EXPORT_DECL = "__attribute__((visibility(\"hidden\")))"; @@ -2142,6 +2147,10 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "MTR_NO_AVAILABILITY=1", + ); "HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src"; INFOPLIST_FILE = CHIPTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -2197,6 +2206,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -2204,10 +2214,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\""; + OTHER_TAPI_FLAGS = "-x objective-c++ -std=gnu++17 -fvisibility=hidden -fobjc-arc"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvos appletvsimulator watchos watchsimulator"; SUPPORTS_TEXT_BASED_API = YES; @@ -2242,20 +2251,6 @@ "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "MTR_ENABLE_PROVISIONAL=1", ); - HEADER_SEARCH_PATHS = ( - "$(CHIP_ROOT)/src", - "$(CHIP_ROOT)/src/include", - "$(CHIP_ROOT)/src/lib", - "$(CHIP_ROOT)/src/app", - "$(CHIP_ROOT)/config/ios", - "$(CHIP_ROOT)/third_party/nlassert/repo/include", - "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", - "$(CHIP_ROOT)/src/app/util", - "$(CHIP_ROOT)/third_party/nlio/repo/include", - "$(TEMP_DIR)/out/gen/include", - "$(CHIP_ROOT)/zzz_generated/", - "$(CHIP_ROOT)/zzz_generated/app-common", - ); INFOPLIST_FILE = CHIP/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.4; @@ -2298,6 +2293,20 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; STRIP_STYLE = "non-global"; + SYSTEM_HEADER_SEARCH_PATHS = ( + "$(TEMP_DIR)/out/gen/include", + "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", + "$(CHIP_ROOT)/config/ios", + "$(CHIP_ROOT)/src", + "$(CHIP_ROOT)/src/include", + "$(CHIP_ROOT)/src/lib", + "$(CHIP_ROOT)/src/app", + "$(CHIP_ROOT)/src/app/util", + "$(CHIP_ROOT)/zzz_generated/", + "$(CHIP_ROOT)/zzz_generated/app-common", + "$(CHIP_ROOT)/third_party/nlassert/repo/include", + "$(CHIP_ROOT)/third_party/nlio/repo/include", + ); TAPI_VERIFY_MODE = Pedantic; TARGETED_DEVICE_FAMILY = "1,2,3,4"; VERSION_INFO_EXPORT_DECL = "__attribute__((visibility(\"hidden\")))"; @@ -2310,6 +2319,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "MTR_NO_AVAILABILITY=1", + ); "HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src"; INFOPLIST_FILE = CHIPTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( From 53d3b3a3939f9847088cc17b4be9f59118136b4a Mon Sep 17 00:00:00 2001 From: Thomas Langewouters <82949801+q-thla@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:54:54 +0100 Subject: [PATCH 11/45] [QPG] lighting-app: Persist level and color (#31601) Use DeferredAttributePersistenceProvider to save CurrentX, CurrentY and CurrentLevel attributes. Restore them on startup. --- examples/lighting-app/qpg/src/AppTask.cpp | 23 ++++++++++++++ .../lighting-app/qpg/src/ZclCallbacks.cpp | 30 ++++++++++++++++++- examples/lighting-app/qpg/zap/light.matter | 4 +-- examples/lighting-app/qpg/zap/light.zap | 6 ++-- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 5781e4069ad1eb..1dd1aa85514a7a 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -72,6 +73,7 @@ using namespace ::chip::DeviceLayer; static uint8_t countdown = 0; namespace { +constexpr EndpointId kLightEndpointId = 1; TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; @@ -93,6 +95,25 @@ StaticTask_t appTaskStruct; Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; +// Define a custom attribute persister which makes actual write of the attribute value +// to the non-volatile storage only when it has remained constant for 5 seconds. This is to reduce +// the flash wearout when the attribute changes frequently as a result of commands. +// DeferredAttribute object describes a deferred attribute, but also holds a buffer with a value to +// be written, so it must live so long as the DeferredAttributePersistenceProvider object. +// +DeferredAttribute gPersisters[] = { DeferredAttribute(ConcreteAttributePath(kLightEndpointId, Clusters::ColorControl::Id, + Clusters::ColorControl::Attributes::CurrentX::Id)), + DeferredAttribute(ConcreteAttributePath(kLightEndpointId, Clusters::ColorControl::Id, + Clusters::ColorControl::Attributes::CurrentY::Id)), + DeferredAttribute(ConcreteAttributePath(kLightEndpointId, Clusters::LevelControl::Id, + Clusters::LevelControl::Attributes::CurrentLevel::Id)) + +}; + +DeferredAttributePersistenceProvider gDeferredAttributePersister(Server::GetInstance().GetDefaultAttributePersister(), + Span(gPersisters, 3), + System::Clock::Milliseconds32(5000)); + /********************************************************** * Identify Callbacks *********************************************************/ @@ -250,6 +271,8 @@ void AppTask::InitServer(intptr_t arg) chip::Server::GetInstance().Init(initParams); + app::SetAttributePersistenceProvider(&gDeferredAttributePersister); + #if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); #endif diff --git a/examples/lighting-app/qpg/src/ZclCallbacks.cpp b/examples/lighting-app/qpg/src/ZclCallbacks.cpp index fce10c0d60f1d1..0b75837a64a8cc 100644 --- a/examples/lighting-app/qpg/src/ZclCallbacks.cpp +++ b/examples/lighting-app/qpg/src/ZclCallbacks.cpp @@ -160,13 +160,41 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) { + uint8_t levelValue; + XyColor_t xy; bool onOffValue = false; + app::DataModel::Nullable currentLevel; + EmberAfStatus status; - EmberAfStatus status = OnOff::Attributes::OnOff::Get(1, &onOffValue); + status = OnOff::Attributes::OnOff::Get(1, &onOffValue); if (status == EMBER_ZCL_STATUS_SUCCESS) { LightingMgr().InitiateAction(onOffValue ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION, 0, 1, (uint8_t *) onOffValue); } + + /* restore values saved by DeferredAttributePersistenceProvider */ + status = LevelControl::Attributes::CurrentLevel::Get(endpoint, currentLevel); + if (status != EMBER_ZCL_STATUS_SUCCESS || currentLevel.IsNull()) + { + return; + } + + levelValue = currentLevel.Value(); + + status = ColorControl::Attributes::CurrentY::Get(endpoint, &xy.y); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + return; + } + status = ColorControl::Attributes::CurrentX::Get(endpoint, &xy.x); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + return; + } + ChipLogProgress(Zcl, "restore level: %u", levelValue); + LightingMgr().InitiateAction(LightingManager::LEVEL_ACTION, 0, 1, &levelValue); + ChipLogProgress(Zcl, "restore XY color: %u|%u", xy.x, xy.y); + LightingMgr().InitiateAction(LightingManager::COLOR_ACTION_XY, 0, sizeof(xy), (uint8_t *) &xy); } diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 40bde659477d8a..231379b7dcecc8 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -2330,8 +2330,8 @@ endpoint 1 { ram attribute currentHue default = 0x00; ram attribute currentSaturation default = 0x00; ram attribute remainingTime default = 0x0000; - ram attribute currentX default = 0x616B; - ram attribute currentY default = 0x607D; + persist attribute currentX default = 0x616B; + persist attribute currentY default = 0x607D; ram attribute colorTemperatureMireds default = 0x00FA; ram attribute colorMode default = 0x01; ram attribute options default = 0x00; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 2c881ce56c2e37..32c773385f5b54 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -5310,7 +5310,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x616B", @@ -5326,7 +5326,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x607D", @@ -5980,4 +5980,4 @@ "networkId": 0 } ] -} \ No newline at end of file +} From be8dccba504496dc78abb3b225cb0533d15da30a Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 24 Jan 2024 19:48:52 +0530 Subject: [PATCH 12/45] [ESP32] Fix build and crash and add DeviceManagementCluster, EVSE mode and DeviceManagementCluster mode. (#31591) * [ESP32] Fix build failure and Add DeviceEnergyManagement clusters initialization * Fix crash * Support EVSE and Device Energy Management Mode * Sync esp32 with linux app --- .github/workflows/examples-esp32.yaml | 3 + .../src/EnergyEvseManager.cpp | 7 +- .../esp32/main/CMakeLists.txt | 2 + .../energy-management-app/esp32/main/main.cpp | 256 ++++++++++++++++-- 4 files changed, 240 insertions(+), 28 deletions(-) diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 47908d654006e9..2e5432dd4ec03f 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -165,3 +165,6 @@ jobs: - name: Build example Lighting App (external platform) run: scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults + + - name: Build example Energy Management App + run: scripts/examples/esp_example.sh energy-management-app sdkconfig.defaults diff --git a/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp b/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp index 710b13f9d342b8..24643885d54368 100644 --- a/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp +++ b/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp @@ -27,7 +27,12 @@ CHIP_ERROR EnergyEvseManager::LoadPersistentAttributes() { SafeAttributePersistenceProvider * aProvider = GetSafeAttributePersistenceProvider(); - EndpointId aEndpointId = mDelegate->GetEndpointId(); + if (aProvider == nullptr) + { + ChipLogError(AppServer, "GetSafeAttributePersistenceProvider returned NULL"); + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + EndpointId aEndpointId = mDelegate->GetEndpointId(); CHIP_ERROR err; // Restore ChargingEnabledUntil value diff --git a/examples/energy-management-app/esp32/main/CMakeLists.txt b/examples/energy-management-app/esp32/main/CMakeLists.txt index 1c7f2a5b782948..46f97d766dbfeb 100644 --- a/examples/energy-management-app/esp32/main/CMakeLists.txt +++ b/examples/energy-management-app/esp32/main/CMakeLists.txt @@ -50,6 +50,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/barrier-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" @@ -63,6 +64,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-base-server" ) set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash) diff --git a/examples/energy-management-app/esp32/main/main.cpp b/examples/energy-management-app/esp32/main/main.cpp index 77899a45b58d03..fd79e606afb6aa 100644 --- a/examples/energy-management-app/esp32/main/main.cpp +++ b/examples/energy-management-app/esp32/main/main.cpp @@ -16,9 +16,12 @@ */ #include "DeviceCallbacks.h" +#include #include #include #include +#include +#include #include "esp_log.h" #include @@ -74,9 +77,11 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; -static EnergyEvseDelegate * gDelegate = nullptr; -static EnergyEvseManager * gInstance = nullptr; -static EVSEManufacturer * gEvseManufacturer = nullptr; +static std::unique_ptr gEvseDelegate; +static std::unique_ptr gEvseInstance; +static std::unique_ptr gDEMDelegate; +static std::unique_ptr gDEMInstance; +static std::unique_ptr gEvseManufacturer; #if CONFIG_ENABLE_ESP_INSIGHTS_TRACE extern const char insights_auth_key_start[] asm("_binary_insights_auth_key_txt_start"); @@ -116,44 +121,238 @@ chip::Credentials::DeviceAttestationCredentialsProvider * get_dac_provider(void) } // namespace -void ApplicationInit() +EVSEManufacturer * EnergyEvse::GetEvseManufacturer() +{ + return gEvseManufacturer.get(); +} + +/* + * @brief Creates a Delegate and Instance for DEM + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR DeviceEnergyManagementInit() +{ + if (gDEMDelegate || gDEMInstance) + { + ESP_LOGE(TAG, "DEM Instance or Delegate already exist."); + return CHIP_ERROR_INCORRECT_STATE; + } + + gDEMDelegate = std::make_unique(); + if (!gDEMDelegate) + { + ESP_LOGE(TAG, "Failed to allocate memory for DeviceEnergyManagementDelegate"); + return CHIP_ERROR_NO_MEMORY; + } + + /* Manufacturer may optionally not support all features, commands & attributes */ + gDEMInstance = std::make_unique( + EndpointId(ENERGY_EVSE_ENDPOINT), *gDEMDelegate, + BitMask( + DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, + DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, + DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, + DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); + + if (!gDEMInstance) + { + ESP_LOGE(TAG, "Failed to allocate memory for DeviceEnergyManagementManager"); + gDEMDelegate.reset(); + return CHIP_ERROR_NO_MEMORY; + } + + CHIP_ERROR err = gDEMInstance->Init(); /* Register Attribute & Command handlers */ + if (err != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Init failed on gDEMInstance, err:%" CHIP_ERROR_FORMAT, err.Format()); + gDEMInstance.reset(); + gDEMDelegate.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementShutdown() { - if ((gDelegate == nullptr) && (gInstance == nullptr) && (gEvseManufacturer == nullptr)) + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + if (gDEMInstance) { - gDelegate = new EnergyEvseDelegate(); - if (gDelegate != nullptr) - { - gInstance = new EnergyEvseManager( - EndpointId(ENERGY_EVSE_ENDPOINT), *gDelegate, - BitMask(EnergyEvse::Feature::kChargingPreferences, - EnergyEvse::Feature::kPlugAndCharge, EnergyEvse::Feature::kRfid, - EnergyEvse::Feature::kSoCReporting, EnergyEvse::Feature::kV2x), - BitMask(OptionalAttributes::kSupportsUserMaximumChargingCurrent, - OptionalAttributes::kSupportsRandomizationWindow, - OptionalAttributes::kSupportsApproximateEvEfficiency), - BitMask(OptionalCommands::kSupportsStartDiagnostics)); - gInstance->Init(); /* Register Attribute & Command handlers */ - } + /* deregister attribute & command handlers */ + gDEMInstance->Shutdown(); + gDEMInstance.reset(); } - else + if (gDEMDelegate) { - ChipLogError(AppServer, "EVSE Instance or Delegate already exist.") + gDEMDelegate.reset(); } + return CHIP_NO_ERROR; +} + +/* + * @brief Creates a Delegate and Instance for EVSE cluster + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR EnergyEvseInit() +{ + CHIP_ERROR err; - if (gEvseManufacturer == nullptr) + if (gEvseDelegate || gEvseInstance) { - gEvseManufacturer = new EVSEManufacturer(); - gEvseManufacturer->Init(gInstance); + ESP_LOGE(TAG, "EVSE Instance or Delegate already exist."); + return CHIP_ERROR_INCORRECT_STATE; } - else + + gEvseDelegate = std::make_unique(); + if (!gEvseDelegate) + { + ESP_LOGE(TAG, "Failed to allocate memory for EnergyEvseDelegate"); + return CHIP_ERROR_NO_MEMORY; + } + + /* Manufacturer may optionally not support all features, commands & attributes */ + gEvseInstance = std::make_unique( + EndpointId(ENERGY_EVSE_ENDPOINT), *gEvseDelegate, + BitMask(EnergyEvse::Feature::kChargingPreferences, EnergyEvse::Feature::kPlugAndCharge, + EnergyEvse::Feature::kRfid, EnergyEvse::Feature::kSoCReporting, + EnergyEvse::Feature::kV2x), + BitMask(EnergyEvse::OptionalAttributes::kSupportsUserMaximumChargingCurrent, + EnergyEvse::OptionalAttributes::kSupportsRandomizationWindow, + EnergyEvse::OptionalAttributes::kSupportsApproximateEvEfficiency), + BitMask(EnergyEvse::OptionalCommands::kSupportsStartDiagnostics)); + + if (!gEvseInstance) { - ChipLogError(AppServer, "EVSEManufacturer already exists.") + ESP_LOGE(TAG, "Failed to allocate memory for EnergyEvseManager"); + gEvseDelegate.reset(); + return CHIP_ERROR_NO_MEMORY; } + + err = gEvseInstance->Init(); /* Register Attribute & Command handlers */ + if (err != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Init failed on gEvseInstance, err:%" CHIP_ERROR_FORMAT, err.Format()); + gEvseInstance.reset(); + gEvseDelegate.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EnergyEvseShutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + if (gEvseInstance) + { + /* deregister attribute & command handlers */ + gEvseInstance->Shutdown(); + gEvseInstance.reset(); + } + + if (gEvseDelegate) + { + gEvseDelegate.reset(); + } + + return CHIP_NO_ERROR; +} + +/* + * @brief Creates a EVSEManufacturer class to hold the EVSE & DEM clusters + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR EVSEManufacturerInit() +{ + CHIP_ERROR err; + + if (gEvseManufacturer) + { + ESP_LOGE(TAG, "EvseManufacturer already exist."); + return CHIP_ERROR_INCORRECT_STATE; + } + + /* Now create EVSEManufacturer */ + gEvseManufacturer = std::make_unique(gEvseInstance.get()); + if (!gEvseManufacturer) + { + ESP_LOGE(TAG, "Failed to allocate memory for EvseManufacturer"); + return CHIP_ERROR_NO_MEMORY; + } + + /* Call Manufacturer specific init */ + err = gEvseManufacturer->Init(); + if (err != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Init failed on gEvseManufacturer, err:%" CHIP_ERROR_FORMAT, err.Format()); + gEvseManufacturer.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EVSEManufacturerShutdown() +{ + if (gEvseManufacturer) + { + /* Shutdown the EVSEManufacturer */ + gEvseManufacturer->Shutdown(); + gEvseManufacturer.reset(); + } + + return CHIP_NO_ERROR; +} + +void ApplicationInit() +{ + if (DeviceEnergyManagementInit() != CHIP_NO_ERROR) + { + return; + } + + if (EnergyEvseInit() != CHIP_NO_ERROR) + { + DeviceEnergyManagementShutdown(); + return; + } + + if (EVSEManufacturerInit() != CHIP_NO_ERROR) + { + DeviceEnergyManagementShutdown(); + EnergyEvseShutdown(); + return; + } +} + +void ApplicationShutdown() +{ + ESP_LOGD(TAG, "Energy Management App: ApplicationShutdown()"); + + /* Shutdown in reverse order that they were created */ + EVSEManufacturerShutdown(); /* Free the EVSEManufacturer */ + EnergyEvseShutdown(); /* Free the EnergyEvse */ + DeviceEnergyManagementShutdown(); /* Free the DEM */ + + Clusters::DeviceEnergyManagementMode::Shutdown(); + Clusters::EnergyEvseMode::Shutdown(); } static void InitServer(intptr_t context) { - ApplicationInit(); // Print QR Code URL PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE)); @@ -175,6 +374,9 @@ static void InitServer(intptr_t context) static Tracing::Insights::ESP32Backend backend; Tracing::Register(backend); #endif + + // Application code should always be initialised after the initialisation of server. + ApplicationInit(); } extern "C" void app_main() From fc3d1cb481bec14d21143f8bbad16fef5ee73c9e Mon Sep 17 00:00:00 2001 From: SAYON DEEP Date: Wed, 24 Jan 2024 19:59:17 +0530 Subject: [PATCH 13/45] updated guide for esp-idf v5.1.2 (#31652) --- docs/guides/esp32/setup_idf_chip.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index 900bfc170b5dea..5a6728c44d8417 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -13,25 +13,25 @@ step. ### Install Prerequisites -- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-linux-users) -- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-macos-users) +- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/linux-macos-setup.html#for-linux-users) +- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v5.1.1 +### Get IDF v5.1.2 -- Clone ESP-IDF [v5.1.1 - release](https://github.com/espressif/esp-idf/releases/tag/v5.1.1 +- Clone ESP-IDF [v5.1.2 + release](https://github.com/espressif/esp-idf/releases/tag/v5.1.2 ``` - git clone -b v5.1.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git + git clone -b v5.1.2 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git cd esp-idf ./install.sh ``` -- To update an existing esp-idf toolchain to v5.1.1: +- To update an existing esp-idf toolchain to v5.1.2: ``` cd path/to/esp-idf - git fetch --depth 1 origin v5.1.1 + git fetch --depth 1 origin v5.1.2 git reset --hard FETCH_HEAD git submodule update --depth 1 --recursive --init From 16409cad4204f81e528bccbfeaa84fd6c1395c22 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 24 Jan 2024 10:03:53 -0500 Subject: [PATCH 14/45] Actually set the endpointID property of MTRCluster. (#31633) It never got set to anything. --- src/darwin/Framework/CHIP/MTRCluster.mm | 2 +- .../Framework/CHIP/MTRCluster_Internal.h | 1 - .../CHIP/templates/MTRBaseClusters-src.zapt | 8 +- .../CHIP/templates/MTRClusters-src.zapt | 6 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 8200 ++++++++--------- .../CHIP/zap-generated/MTRClusters.mm | 4642 +++++----- .../Framework/CHIPTests/MTRDeviceTests.m | 13 + .../CHIPTests/MTRSwiftDeviceTests.swift | 158 +- 8 files changed, 6527 insertions(+), 6503 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 27324cde294b85..96d4c4bb462e34 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -28,7 +28,7 @@ - (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_ if (self = [super init]) { // TODO consider range-checking the incoming number to make sure it's // actually in the EndpointId range - _endpoint = endpointID.unsignedShortValue; + _endpointID = endpointID; _callbackQueue = queue; } return self; diff --git a/src/darwin/Framework/CHIP/MTRCluster_Internal.h b/src/darwin/Framework/CHIP/MTRCluster_Internal.h index 937c110a4ea171..78e4c491f6c999 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_Internal.h @@ -30,7 +30,6 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -@property (nonatomic, readonly) chip::EndpointId endpoint; - (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 42b20c0c6cb0ef..de92791826c666 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -91,7 +91,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/if}} using RequestType = {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -127,7 +127,7 @@ MTR{{cluster}}Cluster{{command}}Params (void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) {{#if_is_fabric_scoped_struct type}} @@ -176,7 +176,7 @@ MTR{{cluster}}Cluster{{command}}Params TypeInfo::Type cppValue; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -189,7 +189,7 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 41027b72fa8cc2..c42b95e71ef9b7 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -72,7 +72,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/if}} using RequestType = {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -107,7 +107,7 @@ MTR{{cluster}}Cluster{{command}}Params {{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} - (NSDictionary * _Nullable)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; } {{#if (or isWritableAttribute @@ -126,7 +126,7 @@ MTR{{cluster}}Cluster{{command}}Params } {{/if}} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 7e2d9c98fe2270..693c9dd8620b5e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -76,7 +76,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Identify::Commands::Identify::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100,7 +100,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Identify::Commands::TriggerEffect::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -114,7 +114,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -145,7 +145,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -155,7 +155,7 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -178,7 +178,7 @@ + (void)readAttributeIdentifyTimeWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -191,7 +191,7 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -214,7 +214,7 @@ + (void)readAttributeIdentifyTypeWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -227,7 +227,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -250,7 +250,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -263,7 +263,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -286,7 +286,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -299,7 +299,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -322,7 +322,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -335,7 +335,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -358,7 +358,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -371,7 +371,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -394,7 +394,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -407,7 +407,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -720,7 +720,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completion:( auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::AddGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -744,7 +744,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params completion auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::ViewGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -768,7 +768,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::GetGroupMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -792,7 +792,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params comple auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::RemoveGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -820,7 +820,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::RemoveAllGroups::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -844,7 +844,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::AddGroupIfIdentifying::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -858,7 +858,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -871,7 +871,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -894,7 +894,7 @@ + (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -907,7 +907,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -930,7 +930,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -943,7 +943,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -966,7 +966,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -979,7 +979,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1002,7 +1002,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1015,7 +1015,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1038,7 +1038,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1051,7 +1051,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1074,7 +1074,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1087,7 +1087,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1397,7 +1397,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(M auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::Off::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1425,7 +1425,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTR auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::On::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1453,7 +1453,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::Toggle::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1477,7 +1477,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OffWithEffect::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1505,7 +1505,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OnWithRecallGlobalScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1529,7 +1529,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OnWithTimedOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1543,7 +1543,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1556,7 +1556,7 @@ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1579,7 +1579,7 @@ + (void)readAttributeOnOffWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1592,7 +1592,7 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1615,7 +1615,7 @@ + (void)readAttributeGlobalSceneControlWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1646,7 +1646,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1656,7 +1656,7 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1679,7 +1679,7 @@ + (void)readAttributeOnTimeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1710,7 +1710,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1720,7 +1720,7 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1743,7 +1743,7 @@ + (void)readAttributeOffWaitTimeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1779,7 +1779,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:( nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -1789,7 +1789,7 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1812,7 +1812,7 @@ + (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1825,7 +1825,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1848,7 +1848,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1861,7 +1861,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1884,7 +1884,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1897,7 +1897,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1920,7 +1920,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1933,7 +1933,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1956,7 +1956,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -1969,7 +1969,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -1992,7 +1992,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2005,7 +2005,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2464,7 +2464,7 @@ @implementation MTRBaseClusterOnOffSwitchConfiguration - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2477,7 +2477,7 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2500,7 +2500,7 @@ + (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2531,7 +2531,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -2541,7 +2541,7 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2564,7 +2564,7 @@ + (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2577,7 +2577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2600,7 +2600,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2613,7 +2613,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2636,7 +2636,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2649,7 +2649,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2672,7 +2672,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2685,7 +2685,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2708,7 +2708,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2721,7 +2721,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -2744,7 +2744,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -2757,7 +2757,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3059,7 +3059,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToLevel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3083,7 +3083,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Move::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3107,7 +3107,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3131,7 +3131,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3155,7 +3155,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3179,7 +3179,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3203,7 +3203,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::StepWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3227,7 +3227,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::StopWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3251,7 +3251,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3265,7 +3265,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3278,7 +3278,7 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3301,7 +3301,7 @@ + (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3314,7 +3314,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3337,7 +3337,7 @@ + (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3350,7 +3350,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3373,7 +3373,7 @@ + (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3386,7 +3386,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3409,7 +3409,7 @@ + (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3422,7 +3422,7 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3445,7 +3445,7 @@ + (void)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3458,7 +3458,7 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3481,7 +3481,7 @@ + (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3494,7 +3494,7 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3517,7 +3517,7 @@ + (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3548,7 +3548,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3558,7 +3558,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3581,7 +3581,7 @@ + (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3612,7 +3612,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3622,7 +3622,7 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3645,7 +3645,7 @@ + (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3681,7 +3681,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWr nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3691,7 +3691,7 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3714,7 +3714,7 @@ + (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3750,7 +3750,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value para nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3760,7 +3760,7 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3783,7 +3783,7 @@ + (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3819,7 +3819,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value par nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3829,7 +3829,7 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3852,7 +3852,7 @@ + (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3888,7 +3888,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value param nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3898,7 +3898,7 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3921,7 +3921,7 @@ + (void)readAttributeDefaultMoveRateWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -3957,7 +3957,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value p nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -3967,7 +3967,7 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -3990,7 +3990,7 @@ + (void)readAttributeStartUpCurrentLevelWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4003,7 +4003,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4026,7 +4026,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4039,7 +4039,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4062,7 +4062,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4075,7 +4075,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4098,7 +4098,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4111,7 +4111,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4134,7 +4134,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4147,7 +4147,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4170,7 +4170,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -4183,7 +4183,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -4988,7 +4988,7 @@ @implementation MTRBaseClusterBinaryInputBasic - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5019,7 +5019,7 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5029,7 +5029,7 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5052,7 +5052,7 @@ + (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5083,7 +5083,7 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5093,7 +5093,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5116,7 +5116,7 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5147,7 +5147,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5157,7 +5157,7 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5180,7 +5180,7 @@ + (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5211,7 +5211,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5221,7 +5221,7 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5244,7 +5244,7 @@ + (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5257,7 +5257,7 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5280,7 +5280,7 @@ + (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5311,7 +5311,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5321,7 +5321,7 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5344,7 +5344,7 @@ + (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5375,7 +5375,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -5385,7 +5385,7 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5408,7 +5408,7 @@ + (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5421,7 +5421,7 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5444,7 +5444,7 @@ + (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5457,7 +5457,7 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5480,7 +5480,7 @@ + (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5493,7 +5493,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5516,7 +5516,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5529,7 +5529,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5552,7 +5552,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5565,7 +5565,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5588,7 +5588,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5601,7 +5601,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5624,7 +5624,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5637,7 +5637,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -5660,7 +5660,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -5673,7 +5673,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6249,7 +6249,7 @@ @implementation MTRBaseClusterPulseWidthModulation - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6262,7 +6262,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6285,7 +6285,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6298,7 +6298,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6321,7 +6321,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6334,7 +6334,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6357,7 +6357,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6370,7 +6370,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6393,7 +6393,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6406,7 +6406,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6429,7 +6429,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6442,7 +6442,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6469,7 +6469,7 @@ @implementation MTRBaseClusterDescriptor - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6482,7 +6482,7 @@ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6505,7 +6505,7 @@ + (void)readAttributeDeviceTypeListWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6518,7 +6518,7 @@ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6541,7 +6541,7 @@ + (void)readAttributeServerListWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6554,7 +6554,7 @@ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6577,7 +6577,7 @@ + (void)readAttributeClientListWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6590,7 +6590,7 @@ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6613,7 +6613,7 @@ + (void)readAttributePartsListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6626,7 +6626,7 @@ - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6649,7 +6649,7 @@ + (void)readAttributeTagListWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6662,7 +6662,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6685,7 +6685,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6698,7 +6698,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6721,7 +6721,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6734,7 +6734,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6757,7 +6757,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6770,7 +6770,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6793,7 +6793,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6806,7 +6806,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -6829,7 +6829,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -6842,7 +6842,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7195,7 +7195,7 @@ @implementation MTRBaseClusterBinding - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::Binding::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7263,7 +7263,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWrit } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -7273,7 +7273,7 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::Binding::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7296,7 +7296,7 @@ + (void)readAttributeBindingWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7309,7 +7309,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7332,7 +7332,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7345,7 +7345,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7368,7 +7368,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7381,7 +7381,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7404,7 +7404,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7417,7 +7417,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7440,7 +7440,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7453,7 +7453,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7476,7 +7476,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -7489,7 +7489,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7745,7 +7745,7 @@ @implementation MTRBaseClusterAccessControl - (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7870,7 +7870,7 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value params:(MTRWritePar } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -7880,7 +7880,7 @@ - (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7903,7 +7903,7 @@ + (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)c - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7956,7 +7956,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWr } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -7966,7 +7966,7 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -7989,7 +7989,7 @@ + (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8002,7 +8002,7 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8025,7 +8025,7 @@ + (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClus - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8038,7 +8038,7 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8061,7 +8061,7 @@ + (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClust - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8074,7 +8074,7 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8097,7 +8097,7 @@ + (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClus - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8110,7 +8110,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8133,7 +8133,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8146,7 +8146,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8169,7 +8169,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8182,7 +8182,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8205,7 +8205,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8218,7 +8218,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8241,7 +8241,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8254,7 +8254,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8277,7 +8277,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8290,7 +8290,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -8705,7 +8705,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::InstantAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8729,7 +8729,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::InstantActionWithTransition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8753,7 +8753,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StartAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8777,7 +8777,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StartActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8801,7 +8801,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StopAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8825,7 +8825,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::PauseAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8849,7 +8849,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::PauseActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8873,7 +8873,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::ResumeAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8897,7 +8897,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::EnableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8921,7 +8921,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::EnableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8945,7 +8945,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::DisableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8969,7 +8969,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::DisableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8983,7 +8983,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -8996,7 +8996,7 @@ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9019,7 +9019,7 @@ + (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9032,7 +9032,7 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9055,7 +9055,7 @@ + (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9068,7 +9068,7 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9091,7 +9091,7 @@ + (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9104,7 +9104,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9127,7 +9127,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9140,7 +9140,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9163,7 +9163,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9176,7 +9176,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9199,7 +9199,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9212,7 +9212,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9235,7 +9235,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9248,7 +9248,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9271,7 +9271,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9284,7 +9284,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9678,7 +9678,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BasicInformation::Commands::MfgSpecificPing::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9692,7 +9692,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9705,7 +9705,7 @@ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9728,7 +9728,7 @@ + (void)readAttributeDataModelRevisionWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9741,7 +9741,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9764,7 +9764,7 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9777,7 +9777,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9800,7 +9800,7 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9813,7 +9813,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9836,7 +9836,7 @@ + (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9849,7 +9849,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9872,7 +9872,7 @@ + (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9903,7 +9903,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRW TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -9913,7 +9913,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -9936,7 +9936,7 @@ + (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -9967,7 +9967,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -9977,7 +9977,7 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10000,7 +10000,7 @@ + (void)readAttributeLocationWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10013,7 +10013,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10036,7 +10036,7 @@ + (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10049,7 +10049,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10072,7 +10072,7 @@ + (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterState - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10085,7 +10085,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10108,7 +10108,7 @@ + (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10121,7 +10121,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10144,7 +10144,7 @@ + (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterState - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10157,7 +10157,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10180,7 +10180,7 @@ + (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10193,7 +10193,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10216,7 +10216,7 @@ + (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10229,7 +10229,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10252,7 +10252,7 @@ + (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10265,7 +10265,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10288,7 +10288,7 @@ + (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10301,7 +10301,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10324,7 +10324,7 @@ + (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10355,7 +10355,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -10365,7 +10365,7 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10388,7 +10388,7 @@ + (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10401,7 +10401,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10424,7 +10424,7 @@ + (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10437,7 +10437,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10460,7 +10460,7 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10473,7 +10473,7 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10496,7 +10496,7 @@ + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10509,7 +10509,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10532,7 +10532,7 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10545,7 +10545,7 @@ - (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10568,7 +10568,7 @@ + (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10581,7 +10581,7 @@ - (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10604,7 +10604,7 @@ + (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10617,7 +10617,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10640,7 +10640,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10653,7 +10653,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10676,7 +10676,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10689,7 +10689,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10712,7 +10712,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10725,7 +10725,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10748,7 +10748,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10761,7 +10761,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -10784,7 +10784,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -10797,7 +10797,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -11758,7 +11758,7 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11782,7 +11782,7 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11806,7 +11806,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11820,7 +11820,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -11833,7 +11833,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -11856,7 +11856,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -11869,7 +11869,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -11892,7 +11892,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -11905,7 +11905,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -11928,7 +11928,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -11941,7 +11941,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -11964,7 +11964,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -11977,7 +11977,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12000,7 +12000,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12013,7 +12013,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12262,7 +12262,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12276,7 +12276,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou - (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12330,7 +12330,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value par } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -12340,7 +12340,7 @@ - (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12363,7 +12363,7 @@ + (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12376,7 +12376,7 @@ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12399,7 +12399,7 @@ + (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12412,7 +12412,7 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12435,7 +12435,7 @@ + (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12448,7 +12448,7 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12471,7 +12471,7 @@ + (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12484,7 +12484,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12507,7 +12507,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12520,7 +12520,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12543,7 +12543,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12556,7 +12556,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12579,7 +12579,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12592,7 +12592,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12615,7 +12615,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12628,7 +12628,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -12651,7 +12651,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -12664,7 +12664,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13034,7 +13034,7 @@ @implementation MTRBaseClusterLocalizationConfiguration - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13065,7 +13065,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -13075,7 +13075,7 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13098,7 +13098,7 @@ + (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13111,7 +13111,7 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13134,7 +13134,7 @@ + (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13147,7 +13147,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13170,7 +13170,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13183,7 +13183,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13206,7 +13206,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13219,7 +13219,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13242,7 +13242,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13255,7 +13255,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13278,7 +13278,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13291,7 +13291,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13314,7 +13314,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13327,7 +13327,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13618,7 +13618,7 @@ @implementation MTRBaseClusterTimeFormatLocalization - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13649,7 +13649,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -13659,7 +13659,7 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13682,7 +13682,7 @@ + (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13713,7 +13713,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -13723,7 +13723,7 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13746,7 +13746,7 @@ + (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13759,7 +13759,7 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13782,7 +13782,7 @@ + (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13795,7 +13795,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13818,7 +13818,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13831,7 +13831,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13854,7 +13854,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13867,7 +13867,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13890,7 +13890,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13903,7 +13903,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13926,7 +13926,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13939,7 +13939,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -13962,7 +13962,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -13975,7 +13975,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14309,7 +14309,7 @@ @implementation MTRBaseClusterUnitLocalization - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14340,7 +14340,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -14350,7 +14350,7 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14373,7 +14373,7 @@ + (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14386,7 +14386,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14409,7 +14409,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14422,7 +14422,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14445,7 +14445,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14458,7 +14458,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14481,7 +14481,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14494,7 +14494,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14517,7 +14517,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14530,7 +14530,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14553,7 +14553,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14566,7 +14566,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14822,7 +14822,7 @@ @implementation MTRBaseClusterPowerSourceConfiguration - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14835,7 +14835,7 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14858,7 +14858,7 @@ + (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14871,7 +14871,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14894,7 +14894,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14907,7 +14907,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14930,7 +14930,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14943,7 +14943,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -14966,7 +14966,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -14979,7 +14979,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15002,7 +15002,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15015,7 +15015,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15038,7 +15038,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15051,7 +15051,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15299,7 +15299,7 @@ @implementation MTRBaseClusterPowerSource - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15312,7 +15312,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15335,7 +15335,7 @@ + (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15348,7 +15348,7 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15371,7 +15371,7 @@ + (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15384,7 +15384,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15407,7 +15407,7 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15420,7 +15420,7 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15443,7 +15443,7 @@ + (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterS - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15456,7 +15456,7 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15479,7 +15479,7 @@ + (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRCluste - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15492,7 +15492,7 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15515,7 +15515,7 @@ + (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15528,7 +15528,7 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15551,7 +15551,7 @@ + (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateC - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15564,7 +15564,7 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15587,7 +15587,7 @@ + (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15600,7 +15600,7 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15623,7 +15623,7 @@ + (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15636,7 +15636,7 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15659,7 +15659,7 @@ + (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15672,7 +15672,7 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15695,7 +15695,7 @@ + (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15708,7 +15708,7 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15731,7 +15731,7 @@ + (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15744,7 +15744,7 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15767,7 +15767,7 @@ + (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15780,7 +15780,7 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15803,7 +15803,7 @@ + (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15816,7 +15816,7 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15839,7 +15839,7 @@ + (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15852,7 +15852,7 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15875,7 +15875,7 @@ + (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateC - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15888,7 +15888,7 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15911,7 +15911,7 @@ + (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15924,7 +15924,7 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15947,7 +15947,7 @@ + (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15960,7 +15960,7 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -15983,7 +15983,7 @@ + (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -15996,7 +15996,7 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16019,7 +16019,7 @@ + (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterS - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16032,7 +16032,7 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16055,7 +16055,7 @@ + (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateC - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16068,7 +16068,7 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16091,7 +16091,7 @@ + (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16104,7 +16104,7 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16127,7 +16127,7 @@ + (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16140,7 +16140,7 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16163,7 +16163,7 @@ + (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateC - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16176,7 +16176,7 @@ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16199,7 +16199,7 @@ + (void)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16212,7 +16212,7 @@ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16235,7 +16235,7 @@ + (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16248,7 +16248,7 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16271,7 +16271,7 @@ + (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16284,7 +16284,7 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16307,7 +16307,7 @@ + (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16320,7 +16320,7 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16343,7 +16343,7 @@ + (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRCluster - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16356,7 +16356,7 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16379,7 +16379,7 @@ + (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16392,7 +16392,7 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16415,7 +16415,7 @@ + (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterState - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16428,7 +16428,7 @@ - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16451,7 +16451,7 @@ + (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16464,7 +16464,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16487,7 +16487,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16500,7 +16500,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16523,7 +16523,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16536,7 +16536,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16559,7 +16559,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16572,7 +16572,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16595,7 +16595,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16608,7 +16608,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -16631,7 +16631,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -16644,7 +16644,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -17953,7 +17953,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17977,7 +17977,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18005,7 +18005,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18019,7 +18019,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18050,7 +18050,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -18060,7 +18060,7 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18083,7 +18083,7 @@ + (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18096,7 +18096,7 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18119,7 +18119,7 @@ + (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStat - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18132,7 +18132,7 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18155,7 +18155,7 @@ + (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18168,7 +18168,7 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18191,7 +18191,7 @@ + (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18204,7 +18204,7 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18227,7 +18227,7 @@ + (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClust - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18240,7 +18240,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18263,7 +18263,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18276,7 +18276,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18299,7 +18299,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18312,7 +18312,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18335,7 +18335,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18348,7 +18348,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18371,7 +18371,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18384,7 +18384,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18407,7 +18407,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -18420,7 +18420,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -18860,7 +18860,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18884,7 +18884,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18908,7 +18908,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18932,7 +18932,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18956,7 +18956,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18980,7 +18980,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19004,7 +19004,7 @@ - (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19018,7 +19018,7 @@ - (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityPara - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19031,7 +19031,7 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19054,7 +19054,7 @@ + (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19067,7 +19067,7 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19090,7 +19090,7 @@ + (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19103,7 +19103,7 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19126,7 +19126,7 @@ + (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19139,7 +19139,7 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19162,7 +19162,7 @@ + (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterState - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19193,7 +19193,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -19203,7 +19203,7 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19226,7 +19226,7 @@ + (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19239,7 +19239,7 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19262,7 +19262,7 @@ + (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateC - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19275,7 +19275,7 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19298,7 +19298,7 @@ + (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19311,7 +19311,7 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19334,7 +19334,7 @@ + (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterState - (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19347,7 +19347,7 @@ - (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19370,7 +19370,7 @@ + (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19383,7 +19383,7 @@ - (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19406,7 +19406,7 @@ + (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterSta - (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19419,7 +19419,7 @@ - (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19442,7 +19442,7 @@ + (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19455,7 +19455,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19478,7 +19478,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19491,7 +19491,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19514,7 +19514,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19527,7 +19527,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19550,7 +19550,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19563,7 +19563,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19586,7 +19586,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19599,7 +19599,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -19622,7 +19622,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -19635,7 +19635,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20196,7 +20196,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20210,7 +20210,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20223,7 +20223,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20246,7 +20246,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20259,7 +20259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20282,7 +20282,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20295,7 +20295,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20318,7 +20318,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20331,7 +20331,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20354,7 +20354,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20367,7 +20367,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20390,7 +20390,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20403,7 +20403,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20636,7 +20636,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20664,7 +20664,7 @@ - (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20678,7 +20678,7 @@ - (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20691,7 +20691,7 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20714,7 +20714,7 @@ + (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20727,7 +20727,7 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20750,7 +20750,7 @@ + (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20763,7 +20763,7 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20786,7 +20786,7 @@ + (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20799,7 +20799,7 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20822,7 +20822,7 @@ + (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterState - (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20835,7 +20835,7 @@ - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20858,7 +20858,7 @@ + (void)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20871,7 +20871,7 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20894,7 +20894,7 @@ + (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateC - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20907,7 +20907,7 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20930,7 +20930,7 @@ + (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20943,7 +20943,7 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -20966,7 +20966,7 @@ + (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -20979,7 +20979,7 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21002,7 +21002,7 @@ + (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterSt - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21015,7 +21015,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21038,7 +21038,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21051,7 +21051,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21074,7 +21074,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21087,7 +21087,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21110,7 +21110,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21123,7 +21123,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21146,7 +21146,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21159,7 +21159,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21182,7 +21182,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21195,7 +21195,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21744,7 +21744,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -21758,7 +21758,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21771,7 +21771,7 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21794,7 +21794,7 @@ + (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21807,7 +21807,7 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21830,7 +21830,7 @@ + (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21843,7 +21843,7 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21866,7 +21866,7 @@ + (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21879,7 +21879,7 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21902,7 +21902,7 @@ + (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterSt - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21915,7 +21915,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21938,7 +21938,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21951,7 +21951,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -21974,7 +21974,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -21987,7 +21987,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22010,7 +22010,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22023,7 +22023,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22046,7 +22046,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22059,7 +22059,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22082,7 +22082,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22095,7 +22095,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22473,7 +22473,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -22487,7 +22487,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22500,7 +22500,7 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22523,7 +22523,7 @@ + (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22536,7 +22536,7 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22559,7 +22559,7 @@ + (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22572,7 +22572,7 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22595,7 +22595,7 @@ + (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22608,7 +22608,7 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22631,7 +22631,7 @@ + (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22644,7 +22644,7 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22667,7 +22667,7 @@ + (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22680,7 +22680,7 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22703,7 +22703,7 @@ + (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22716,7 +22716,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22739,7 +22739,7 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22752,7 +22752,7 @@ - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22775,7 +22775,7 @@ + (void)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22788,7 +22788,7 @@ - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22811,7 +22811,7 @@ + (void)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22824,7 +22824,7 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22847,7 +22847,7 @@ + (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22860,7 +22860,7 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22883,7 +22883,7 @@ + (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22896,7 +22896,7 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22919,7 +22919,7 @@ + (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22932,7 +22932,7 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22955,7 +22955,7 @@ + (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -22968,7 +22968,7 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -22991,7 +22991,7 @@ + (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23004,7 +23004,7 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23027,7 +23027,7 @@ + (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23040,7 +23040,7 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23063,7 +23063,7 @@ + (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23076,7 +23076,7 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23099,7 +23099,7 @@ + (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23112,7 +23112,7 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23135,7 +23135,7 @@ + (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23148,7 +23148,7 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23171,7 +23171,7 @@ + (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCac - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23184,7 +23184,7 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23207,7 +23207,7 @@ + (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStat - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23220,7 +23220,7 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23243,7 +23243,7 @@ + (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTR - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23256,7 +23256,7 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23279,7 +23279,7 @@ + (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23292,7 +23292,7 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23315,7 +23315,7 @@ + (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23328,7 +23328,7 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23351,7 +23351,7 @@ + (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23364,7 +23364,7 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23387,7 +23387,7 @@ + (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23400,7 +23400,7 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23423,7 +23423,7 @@ + (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23436,7 +23436,7 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23459,7 +23459,7 @@ + (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23472,7 +23472,7 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23495,7 +23495,7 @@ + (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterState - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23508,7 +23508,7 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23531,7 +23531,7 @@ + (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23544,7 +23544,7 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23567,7 +23567,7 @@ + (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23580,7 +23580,7 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23603,7 +23603,7 @@ + (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23616,7 +23616,7 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23639,7 +23639,7 @@ + (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateC - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23652,7 +23652,7 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23675,7 +23675,7 @@ + (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23688,7 +23688,7 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23711,7 +23711,7 @@ + (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23724,7 +23724,7 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23747,7 +23747,7 @@ + (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRCluste - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23760,7 +23760,7 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23783,7 +23783,7 @@ + (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClus - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23796,7 +23796,7 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23819,7 +23819,7 @@ + (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23832,7 +23832,7 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23855,7 +23855,7 @@ + (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23868,7 +23868,7 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23891,7 +23891,7 @@ + (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterState - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23904,7 +23904,7 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23927,7 +23927,7 @@ + (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23940,7 +23940,7 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23963,7 +23963,7 @@ + (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -23976,7 +23976,7 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -23999,7 +23999,7 @@ + (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24012,7 +24012,7 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24035,7 +24035,7 @@ + (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24048,7 +24048,7 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24071,7 +24071,7 @@ + (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24084,7 +24084,7 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24107,7 +24107,7 @@ + (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24120,7 +24120,7 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24143,7 +24143,7 @@ + (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateC - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24156,7 +24156,7 @@ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24179,7 +24179,7 @@ + (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24192,7 +24192,7 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24215,7 +24215,7 @@ + (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStat - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24228,7 +24228,7 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24251,7 +24251,7 @@ + (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterSta - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24264,7 +24264,7 @@ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24287,7 +24287,7 @@ + (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24300,7 +24300,7 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24323,7 +24323,7 @@ + (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24336,7 +24336,7 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24359,7 +24359,7 @@ + (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterS - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24372,7 +24372,7 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24395,7 +24395,7 @@ + (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterSt - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24408,7 +24408,7 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24431,7 +24431,7 @@ + (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24444,7 +24444,7 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24467,7 +24467,7 @@ + (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24480,7 +24480,7 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24503,7 +24503,7 @@ + (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24516,7 +24516,7 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24539,7 +24539,7 @@ + (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24552,7 +24552,7 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24575,7 +24575,7 @@ + (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24588,7 +24588,7 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24611,7 +24611,7 @@ + (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24624,7 +24624,7 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24647,7 +24647,7 @@ + (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24660,7 +24660,7 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24683,7 +24683,7 @@ + (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24696,7 +24696,7 @@ - (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribePa reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24719,7 +24719,7 @@ + (void)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClust - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24732,7 +24732,7 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24755,7 +24755,7 @@ + (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterSta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24768,7 +24768,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24791,7 +24791,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24804,7 +24804,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24827,7 +24827,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24840,7 +24840,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24863,7 +24863,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24876,7 +24876,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24899,7 +24899,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24912,7 +24912,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -24935,7 +24935,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -24948,7 +24948,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27391,7 +27391,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -27405,7 +27405,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27418,7 +27418,7 @@ - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27441,7 +27441,7 @@ + (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27454,7 +27454,7 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27477,7 +27477,7 @@ + (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27490,7 +27490,7 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27513,7 +27513,7 @@ + (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27526,7 +27526,7 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27549,7 +27549,7 @@ + (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27562,7 +27562,7 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27585,7 +27585,7 @@ + (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27598,7 +27598,7 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27621,7 +27621,7 @@ + (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27634,7 +27634,7 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27657,7 +27657,7 @@ + (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27670,7 +27670,7 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27693,7 +27693,7 @@ + (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStat - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27706,7 +27706,7 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27729,7 +27729,7 @@ + (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStat - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27742,7 +27742,7 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27765,7 +27765,7 @@ + (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateC - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27778,7 +27778,7 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27801,7 +27801,7 @@ + (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateC - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27814,7 +27814,7 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27837,7 +27837,7 @@ + (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27850,7 +27850,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27873,7 +27873,7 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27886,7 +27886,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27909,7 +27909,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27922,7 +27922,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27945,7 +27945,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27958,7 +27958,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -27981,7 +27981,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -27994,7 +27994,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28017,7 +28017,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28030,7 +28030,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28053,7 +28053,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28066,7 +28066,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28759,7 +28759,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -28773,7 +28773,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28786,7 +28786,7 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28809,7 +28809,7 @@ + (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28822,7 +28822,7 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28845,7 +28845,7 @@ + (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28858,7 +28858,7 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28881,7 +28881,7 @@ + (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28894,7 +28894,7 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28917,7 +28917,7 @@ + (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28930,7 +28930,7 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28953,7 +28953,7 @@ + (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -28966,7 +28966,7 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -28989,7 +28989,7 @@ + (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29002,7 +29002,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29025,7 +29025,7 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29038,7 +29038,7 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29061,7 +29061,7 @@ + (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29074,7 +29074,7 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29097,7 +29097,7 @@ + (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29110,7 +29110,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29133,7 +29133,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29146,7 +29146,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29169,7 +29169,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29182,7 +29182,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29205,7 +29205,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29218,7 +29218,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29241,7 +29241,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29254,7 +29254,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29277,7 +29277,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29290,7 +29290,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29839,7 +29839,7 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetUTCTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -29863,7 +29863,7 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -29887,7 +29887,7 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetTimeZone::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -29911,7 +29911,7 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetDSTOffset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -29935,7 +29935,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetDefaultNTP::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -29949,7 +29949,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29962,7 +29962,7 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -29985,7 +29985,7 @@ + (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -29998,7 +29998,7 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30021,7 +30021,7 @@ + (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30034,7 +30034,7 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30057,7 +30057,7 @@ + (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30070,7 +30070,7 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30093,7 +30093,7 @@ + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30106,7 +30106,7 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30129,7 +30129,7 @@ + (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30142,7 +30142,7 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30165,7 +30165,7 @@ + (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30178,7 +30178,7 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30201,7 +30201,7 @@ + (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30214,7 +30214,7 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30237,7 +30237,7 @@ + (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30250,7 +30250,7 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30273,7 +30273,7 @@ + (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30286,7 +30286,7 @@ - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30309,7 +30309,7 @@ + (void)readAttributeNTPServerAvailableWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30322,7 +30322,7 @@ - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30345,7 +30345,7 @@ + (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30358,7 +30358,7 @@ - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30381,7 +30381,7 @@ + (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateC - (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30394,7 +30394,7 @@ - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30417,7 +30417,7 @@ + (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30430,7 +30430,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30453,7 +30453,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30466,7 +30466,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30489,7 +30489,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30502,7 +30502,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30525,7 +30525,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30538,7 +30538,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30561,7 +30561,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30574,7 +30574,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30597,7 +30597,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30610,7 +30610,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30637,7 +30637,7 @@ @implementation MTRBaseClusterBridgedDeviceBasicInformation - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30650,7 +30650,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30673,7 +30673,7 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30686,7 +30686,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30709,7 +30709,7 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30722,7 +30722,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30745,7 +30745,7 @@ + (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30776,7 +30776,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRW TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -30786,7 +30786,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30809,7 +30809,7 @@ + (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30822,7 +30822,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30845,7 +30845,7 @@ + (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30858,7 +30858,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30881,7 +30881,7 @@ + (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterState - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30894,7 +30894,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30917,7 +30917,7 @@ + (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30930,7 +30930,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30953,7 +30953,7 @@ + (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterState - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -30966,7 +30966,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -30989,7 +30989,7 @@ + (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31002,7 +31002,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31025,7 +31025,7 @@ + (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31038,7 +31038,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31061,7 +31061,7 @@ + (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31074,7 +31074,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31097,7 +31097,7 @@ + (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31110,7 +31110,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31133,7 +31133,7 @@ + (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31146,7 +31146,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31169,7 +31169,7 @@ + (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31182,7 +31182,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31205,7 +31205,7 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31218,7 +31218,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31241,7 +31241,7 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31254,7 +31254,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31277,7 +31277,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31290,7 +31290,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31313,7 +31313,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31326,7 +31326,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31349,7 +31349,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31362,7 +31362,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31385,7 +31385,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31398,7 +31398,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -31421,7 +31421,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -31434,7 +31434,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32183,7 +32183,7 @@ @implementation MTRBaseClusterSwitch - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32196,7 +32196,7 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32219,7 +32219,7 @@ + (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32232,7 +32232,7 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32255,7 +32255,7 @@ + (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32268,7 +32268,7 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32291,7 +32291,7 @@ + (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32304,7 +32304,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32327,7 +32327,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32340,7 +32340,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32363,7 +32363,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32376,7 +32376,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32399,7 +32399,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32412,7 +32412,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32435,7 +32435,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32448,7 +32448,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32471,7 +32471,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32484,7 +32484,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32816,7 +32816,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO } using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -32843,7 +32843,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu } using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -32874,7 +32874,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok } using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -32888,7 +32888,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32901,7 +32901,7 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32924,7 +32924,7 @@ + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32937,7 +32937,7 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32960,7 +32960,7 @@ + (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -32973,7 +32973,7 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -32996,7 +32996,7 @@ + (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33009,7 +33009,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33032,7 +33032,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33045,7 +33045,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33068,7 +33068,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33081,7 +33081,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33104,7 +33104,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33117,7 +33117,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33140,7 +33140,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33153,7 +33153,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33176,7 +33176,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33189,7 +33189,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33538,7 +33538,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33562,7 +33562,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33586,7 +33586,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::CSRRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33610,7 +33610,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AddNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33634,7 +33634,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33658,7 +33658,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33682,7 +33682,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33706,7 +33706,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -33720,7 +33720,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33733,7 +33733,7 @@ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33756,7 +33756,7 @@ + (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33769,7 +33769,7 @@ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33792,7 +33792,7 @@ + (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33805,7 +33805,7 @@ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33828,7 +33828,7 @@ + (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33841,7 +33841,7 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33864,7 +33864,7 @@ + (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33877,7 +33877,7 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33900,7 +33900,7 @@ + (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterSta - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33913,7 +33913,7 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33936,7 +33936,7 @@ + (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33949,7 +33949,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -33972,7 +33972,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -33985,7 +33985,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34008,7 +34008,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34021,7 +34021,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34044,7 +34044,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34057,7 +34057,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34080,7 +34080,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34093,7 +34093,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34116,7 +34116,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34129,7 +34129,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34625,7 +34625,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -34649,7 +34649,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -34673,7 +34673,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -34701,7 +34701,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -34715,7 +34715,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34769,7 +34769,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTR } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -34779,7 +34779,7 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34802,7 +34802,7 @@ + (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34815,7 +34815,7 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34838,7 +34838,7 @@ + (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34851,7 +34851,7 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34874,7 +34874,7 @@ + (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34887,7 +34887,7 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34910,7 +34910,7 @@ + (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34923,7 +34923,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34946,7 +34946,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34959,7 +34959,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -34982,7 +34982,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -34995,7 +34995,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35018,7 +35018,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35031,7 +35031,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35054,7 +35054,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35067,7 +35067,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35090,7 +35090,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35103,7 +35103,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35491,7 +35491,7 @@ @implementation MTRBaseClusterFixedLabel - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35504,7 +35504,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35527,7 +35527,7 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35540,7 +35540,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35563,7 +35563,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35576,7 +35576,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35599,7 +35599,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35612,7 +35612,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35635,7 +35635,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35648,7 +35648,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35671,7 +35671,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35684,7 +35684,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35707,7 +35707,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -35720,7 +35720,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -35968,7 +35968,7 @@ @implementation MTRBaseClusterUserLabel - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36021,7 +36021,7 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWr } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -36031,7 +36031,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36054,7 +36054,7 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36067,7 +36067,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36090,7 +36090,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36103,7 +36103,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36126,7 +36126,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36139,7 +36139,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36162,7 +36162,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36175,7 +36175,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36198,7 +36198,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36211,7 +36211,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36234,7 +36234,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36247,7 +36247,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36503,7 +36503,7 @@ @implementation MTRBaseClusterBooleanState - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36516,7 +36516,7 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36539,7 +36539,7 @@ + (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36552,7 +36552,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36575,7 +36575,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36588,7 +36588,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36611,7 +36611,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36624,7 +36624,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36647,7 +36647,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36660,7 +36660,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36683,7 +36683,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36696,7 +36696,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36719,7 +36719,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -36732,7 +36732,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -36991,7 +36991,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::RegisterClient::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37015,7 +37015,7 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::UnregisterClient::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37043,7 +37043,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::StayActiveRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37057,7 +37057,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37070,7 +37070,7 @@ - (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37093,7 +37093,7 @@ + (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37106,7 +37106,7 @@ - (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37129,7 +37129,7 @@ + (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37142,7 +37142,7 @@ - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37165,7 +37165,7 @@ + (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37178,7 +37178,7 @@ - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37201,7 +37201,7 @@ + (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37214,7 +37214,7 @@ - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37237,7 +37237,7 @@ + (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37250,7 +37250,7 @@ - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37273,7 +37273,7 @@ + (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterS - (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37286,7 +37286,7 @@ - (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37309,7 +37309,7 @@ + (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterS - (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37322,7 +37322,7 @@ - (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscri reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37345,7 +37345,7 @@ + (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRC - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37358,7 +37358,7 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37381,7 +37381,7 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37394,7 +37394,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37417,7 +37417,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37430,7 +37430,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37453,7 +37453,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37466,7 +37466,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37489,7 +37489,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37502,7 +37502,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37525,7 +37525,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37538,7 +37538,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37561,7 +37561,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37574,7 +37574,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37612,7 +37612,7 @@ - (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(M auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::SetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37640,7 +37640,7 @@ - (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::ResetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37664,7 +37664,7 @@ - (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTR auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::AddTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37688,7 +37688,7 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::ReduceTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -37702,7 +37702,7 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completio - (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::SetTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37715,7 +37715,7 @@ - (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::SetTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37738,7 +37738,7 @@ + (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37751,7 +37751,7 @@ - (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37774,7 +37774,7 @@ + (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::TimerState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37787,7 +37787,7 @@ - (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::TimerState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37810,7 +37810,7 @@ + (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37823,7 +37823,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37846,7 +37846,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37859,7 +37859,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37882,7 +37882,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37895,7 +37895,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37918,7 +37918,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37931,7 +37931,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37954,7 +37954,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -37967,7 +37967,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -37990,7 +37990,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38003,7 +38003,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38045,7 +38045,7 @@ - (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -38073,7 +38073,7 @@ - (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullab auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -38101,7 +38101,7 @@ - (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -38129,7 +38129,7 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -38143,7 +38143,7 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38156,7 +38156,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38179,7 +38179,7 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38192,7 +38192,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38215,7 +38215,7 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38228,7 +38228,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38251,7 +38251,7 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38264,7 +38264,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38287,7 +38287,7 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38300,7 +38300,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38323,7 +38323,7 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38336,7 +38336,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38359,7 +38359,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38372,7 +38372,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38395,7 +38395,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38408,7 +38408,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38431,7 +38431,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38444,7 +38444,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38467,7 +38467,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38480,7 +38480,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38503,7 +38503,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38516,7 +38516,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38539,7 +38539,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38552,7 +38552,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38590,7 +38590,7 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params co auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -38604,7 +38604,7 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params co - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38617,7 +38617,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38640,7 +38640,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38653,7 +38653,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38676,7 +38676,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38712,7 +38712,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -38722,7 +38722,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38745,7 +38745,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38781,7 +38781,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -38791,7 +38791,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38814,7 +38814,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38827,7 +38827,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38850,7 +38850,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38863,7 +38863,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38886,7 +38886,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38899,7 +38899,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38922,7 +38922,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38935,7 +38935,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38958,7 +38958,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -38971,7 +38971,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -38994,7 +38994,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39007,7 +39007,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39034,7 +39034,7 @@ @implementation MTRBaseClusterLaundryDryerControls - (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39047,7 +39047,7 @@ - (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39070,7 +39070,7 @@ + (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStat - (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39106,7 +39106,7 @@ - (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39116,7 +39116,7 @@ - (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39139,7 +39139,7 @@ + (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39152,7 +39152,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39175,7 +39175,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39188,7 +39188,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39211,7 +39211,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39224,7 +39224,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39247,7 +39247,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39260,7 +39260,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39283,7 +39283,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39296,7 +39296,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39319,7 +39319,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39332,7 +39332,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39370,7 +39370,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ModeSelect::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -39384,7 +39384,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39397,7 +39397,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39420,7 +39420,7 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39433,7 +39433,7 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39456,7 +39456,7 @@ + (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39469,7 +39469,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39492,7 +39492,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39505,7 +39505,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39528,7 +39528,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39564,7 +39564,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39574,7 +39574,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39597,7 +39597,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39633,7 +39633,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -39643,7 +39643,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39666,7 +39666,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39679,7 +39679,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39702,7 +39702,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39715,7 +39715,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39738,7 +39738,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39751,7 +39751,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39774,7 +39774,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39787,7 +39787,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39810,7 +39810,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39823,7 +39823,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -39846,7 +39846,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -39859,7 +39859,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40315,7 +40315,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -40329,7 +40329,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40342,7 +40342,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40365,7 +40365,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40378,7 +40378,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40401,7 +40401,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40437,7 +40437,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40447,7 +40447,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40470,7 +40470,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40506,7 +40506,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40516,7 +40516,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40539,7 +40539,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40552,7 +40552,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40575,7 +40575,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40588,7 +40588,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40611,7 +40611,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40624,7 +40624,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40647,7 +40647,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40660,7 +40660,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40683,7 +40683,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40696,7 +40696,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40719,7 +40719,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40732,7 +40732,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40770,7 +40770,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -40784,7 +40784,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40797,7 +40797,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40820,7 +40820,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40833,7 +40833,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40856,7 +40856,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40892,7 +40892,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40902,7 +40902,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40925,7 +40925,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40961,7 +40961,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -40971,7 +40971,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -40994,7 +40994,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41007,7 +41007,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41030,7 +41030,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41043,7 +41043,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41066,7 +41066,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41079,7 +41079,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41102,7 +41102,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41115,7 +41115,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41138,7 +41138,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41151,7 +41151,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41174,7 +41174,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41187,7 +41187,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41214,7 +41214,7 @@ @implementation MTRBaseClusterLaundryWasherControls - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41227,7 +41227,7 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41250,7 +41250,7 @@ + (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41286,7 +41286,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value para nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41296,7 +41296,7 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41319,7 +41319,7 @@ + (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41350,7 +41350,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params: TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41360,7 +41360,7 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41383,7 +41383,7 @@ + (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41396,7 +41396,7 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41419,7 +41419,7 @@ + (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41432,7 +41432,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41455,7 +41455,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41468,7 +41468,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41491,7 +41491,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41504,7 +41504,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41527,7 +41527,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41540,7 +41540,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41563,7 +41563,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41576,7 +41576,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41599,7 +41599,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41612,7 +41612,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41650,7 +41650,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcRunMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -41664,7 +41664,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41677,7 +41677,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41700,7 +41700,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41713,7 +41713,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41736,7 +41736,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41772,7 +41772,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -41782,7 +41782,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41805,7 +41805,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41818,7 +41818,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41841,7 +41841,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41854,7 +41854,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41877,7 +41877,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41890,7 +41890,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41913,7 +41913,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41926,7 +41926,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41949,7 +41949,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41962,7 +41962,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -41985,7 +41985,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -41998,7 +41998,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42036,7 +42036,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -42050,7 +42050,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42063,7 +42063,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42086,7 +42086,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42099,7 +42099,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42122,7 +42122,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42158,7 +42158,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -42168,7 +42168,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42191,7 +42191,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42204,7 +42204,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42227,7 +42227,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42240,7 +42240,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42263,7 +42263,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42276,7 +42276,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42299,7 +42299,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42312,7 +42312,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42335,7 +42335,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42348,7 +42348,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42371,7 +42371,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42384,7 +42384,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42426,7 +42426,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TemperatureControl::Commands::SetTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -42440,7 +42440,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42453,7 +42453,7 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42476,7 +42476,7 @@ + (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42489,7 +42489,7 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42512,7 +42512,7 @@ + (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42525,7 +42525,7 @@ - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42548,7 +42548,7 @@ + (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42561,7 +42561,7 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42584,7 +42584,7 @@ + (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42597,7 +42597,7 @@ - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42620,7 +42620,7 @@ + (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterSt - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42633,7 +42633,7 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42656,7 +42656,7 @@ + (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRCluster - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42669,7 +42669,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42692,7 +42692,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42705,7 +42705,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42728,7 +42728,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42741,7 +42741,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42764,7 +42764,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42777,7 +42777,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42800,7 +42800,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42813,7 +42813,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42836,7 +42836,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42849,7 +42849,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42876,7 +42876,7 @@ @implementation MTRBaseClusterRefrigeratorAlarm - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42889,7 +42889,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42912,7 +42912,7 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42925,7 +42925,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42948,7 +42948,7 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42961,7 +42961,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -42984,7 +42984,7 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -42997,7 +42997,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43020,7 +43020,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43033,7 +43033,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43056,7 +43056,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43069,7 +43069,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43092,7 +43092,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43105,7 +43105,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43128,7 +43128,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43141,7 +43141,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43164,7 +43164,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43177,7 +43177,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43215,7 +43215,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -43229,7 +43229,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43242,7 +43242,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43265,7 +43265,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43278,7 +43278,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43301,7 +43301,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43337,7 +43337,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -43347,7 +43347,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43370,7 +43370,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43406,7 +43406,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -43416,7 +43416,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43439,7 +43439,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43452,7 +43452,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43475,7 +43475,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43488,7 +43488,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43511,7 +43511,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43524,7 +43524,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43547,7 +43547,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43560,7 +43560,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43583,7 +43583,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43596,7 +43596,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43619,7 +43619,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43632,7 +43632,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43659,7 +43659,7 @@ @implementation MTRBaseClusterAirQuality - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43672,7 +43672,7 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43695,7 +43695,7 @@ + (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43708,7 +43708,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43731,7 +43731,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43744,7 +43744,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43767,7 +43767,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43780,7 +43780,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43803,7 +43803,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43816,7 +43816,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43839,7 +43839,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43852,7 +43852,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43875,7 +43875,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43888,7 +43888,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43930,7 +43930,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -43944,7 +43944,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43957,7 +43957,7 @@ - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -43980,7 +43980,7 @@ + (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -43993,7 +43993,7 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44016,7 +44016,7 @@ + (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44029,7 +44029,7 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44052,7 +44052,7 @@ + (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44065,7 +44065,7 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44088,7 +44088,7 @@ + (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44101,7 +44101,7 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44124,7 +44124,7 @@ + (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44137,7 +44137,7 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44160,7 +44160,7 @@ + (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44173,7 +44173,7 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44196,7 +44196,7 @@ + (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44209,7 +44209,7 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44232,7 +44232,7 @@ + (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44245,7 +44245,7 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44268,7 +44268,7 @@ + (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStat - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44281,7 +44281,7 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44304,7 +44304,7 @@ + (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44317,7 +44317,7 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44340,7 +44340,7 @@ + (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44371,7 +44371,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -44381,7 +44381,7 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44404,7 +44404,7 @@ + (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterState - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44417,7 +44417,7 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44440,7 +44440,7 @@ + (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44453,7 +44453,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44476,7 +44476,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44489,7 +44489,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44512,7 +44512,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44525,7 +44525,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44548,7 +44548,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44561,7 +44561,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44584,7 +44584,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44597,7 +44597,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44620,7 +44620,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44633,7 +44633,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44671,7 +44671,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherAlarm::Commands::Reset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -44695,7 +44695,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -44709,7 +44709,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44722,7 +44722,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44745,7 +44745,7 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44758,7 +44758,7 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44781,7 +44781,7 @@ + (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44794,7 +44794,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44817,7 +44817,7 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44830,7 +44830,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44853,7 +44853,7 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44866,7 +44866,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44889,7 +44889,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44902,7 +44902,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44925,7 +44925,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44938,7 +44938,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44961,7 +44961,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -44974,7 +44974,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -44997,7 +44997,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45010,7 +45010,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45033,7 +45033,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45046,7 +45046,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45073,7 +45073,7 @@ @implementation MTRBaseClusterMicrowaveOvenMode - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45086,7 +45086,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45109,7 +45109,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45122,7 +45122,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45145,7 +45145,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45158,7 +45158,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45181,7 +45181,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45194,7 +45194,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45217,7 +45217,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45230,7 +45230,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45253,7 +45253,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45266,7 +45266,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45289,7 +45289,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45302,7 +45302,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45325,7 +45325,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45338,7 +45338,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45380,7 +45380,7 @@ - (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCooking auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -45404,7 +45404,7 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -45418,7 +45418,7 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * - (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45431,7 +45431,7 @@ - (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45454,7 +45454,7 @@ + (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45467,7 +45467,7 @@ - (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45490,7 +45490,7 @@ + (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45503,7 +45503,7 @@ - (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45526,7 +45526,7 @@ + (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45539,7 +45539,7 @@ - (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45562,7 +45562,7 @@ + (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45575,7 +45575,7 @@ - (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45598,7 +45598,7 @@ + (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45611,7 +45611,7 @@ - (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45634,7 +45634,7 @@ + (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45647,7 +45647,7 @@ - (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45670,7 +45670,7 @@ + (void)readAttributeSupportedWattsWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45683,7 +45683,7 @@ - (void)subscribeAttributeSelectedWattIndexWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45706,7 +45706,7 @@ + (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45719,7 +45719,7 @@ - (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45742,7 +45742,7 @@ + (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45755,7 +45755,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45778,7 +45778,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45791,7 +45791,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45814,7 +45814,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45827,7 +45827,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45850,7 +45850,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45863,7 +45863,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45886,7 +45886,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45899,7 +45899,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45922,7 +45922,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -45935,7 +45935,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -45977,7 +45977,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46005,7 +46005,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46033,7 +46033,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46061,7 +46061,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46075,7 +46075,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46088,7 +46088,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46111,7 +46111,7 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46124,7 +46124,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46147,7 +46147,7 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46160,7 +46160,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46183,7 +46183,7 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46196,7 +46196,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46219,7 +46219,7 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46232,7 +46232,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46255,7 +46255,7 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46268,7 +46268,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46291,7 +46291,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46304,7 +46304,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46327,7 +46327,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46340,7 +46340,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46363,7 +46363,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46376,7 +46376,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46399,7 +46399,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46412,7 +46412,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46435,7 +46435,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46448,7 +46448,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46471,7 +46471,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46484,7 +46484,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46526,7 +46526,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46554,7 +46554,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46582,7 +46582,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46610,7 +46610,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46638,7 +46638,7 @@ - (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::GoHome::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -46652,7 +46652,7 @@ - (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable) - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46665,7 +46665,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46688,7 +46688,7 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46701,7 +46701,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46724,7 +46724,7 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46737,7 +46737,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46760,7 +46760,7 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46773,7 +46773,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46796,7 +46796,7 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46809,7 +46809,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46832,7 +46832,7 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46845,7 +46845,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46868,7 +46868,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46881,7 +46881,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46904,7 +46904,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46917,7 +46917,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46940,7 +46940,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46953,7 +46953,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -46976,7 +46976,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -46989,7 +46989,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47012,7 +47012,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47025,7 +47025,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47048,7 +47048,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47061,7 +47061,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47099,7 +47099,7 @@ - (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params co auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::AddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47123,7 +47123,7 @@ - (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::ViewScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47147,7 +47147,7 @@ - (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RemoveScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47171,7 +47171,7 @@ - (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47195,7 +47195,7 @@ - (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::StoreScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47219,7 +47219,7 @@ - (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RecallScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47243,7 +47243,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembersh auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47267,7 +47267,7 @@ - (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::CopyScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47281,7 +47281,7 @@ - (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47294,7 +47294,7 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47317,7 +47317,7 @@ + (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47330,7 +47330,7 @@ - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47353,7 +47353,7 @@ + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47366,7 +47366,7 @@ - (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47389,7 +47389,7 @@ + (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47402,7 +47402,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47425,7 +47425,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47438,7 +47438,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47461,7 +47461,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47474,7 +47474,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47497,7 +47497,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47510,7 +47510,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47533,7 +47533,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47546,7 +47546,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47569,7 +47569,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47582,7 +47582,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47624,7 +47624,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -47638,7 +47638,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47651,7 +47651,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47674,7 +47674,7 @@ + (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47687,7 +47687,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47710,7 +47710,7 @@ + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateC - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47723,7 +47723,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47746,7 +47746,7 @@ + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47759,7 +47759,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47782,7 +47782,7 @@ + (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47818,7 +47818,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value param nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -47828,7 +47828,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47851,7 +47851,7 @@ + (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47864,7 +47864,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47887,7 +47887,7 @@ + (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47900,7 +47900,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47923,7 +47923,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47936,7 +47936,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47959,7 +47959,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -47972,7 +47972,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -47995,7 +47995,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48008,7 +48008,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48031,7 +48031,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48044,7 +48044,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48067,7 +48067,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48080,7 +48080,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48122,7 +48122,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -48136,7 +48136,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48149,7 +48149,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48172,7 +48172,7 @@ + (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48185,7 +48185,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48208,7 +48208,7 @@ + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateC - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48221,7 +48221,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48244,7 +48244,7 @@ + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48257,7 +48257,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48280,7 +48280,7 @@ + (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48316,7 +48316,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value param nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -48326,7 +48326,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48349,7 +48349,7 @@ + (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48362,7 +48362,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48385,7 +48385,7 @@ + (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48398,7 +48398,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48421,7 +48421,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48434,7 +48434,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48457,7 +48457,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48470,7 +48470,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48493,7 +48493,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48506,7 +48506,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48529,7 +48529,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48542,7 +48542,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48565,7 +48565,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48578,7 +48578,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48616,7 +48616,7 @@ - (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -48640,7 +48640,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableD auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -48654,7 +48654,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableD - (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48685,7 +48685,7 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -48695,7 +48695,7 @@ - (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48718,7 +48718,7 @@ + (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterSta - (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48731,7 +48731,7 @@ - (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48754,7 +48754,7 @@ + (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRCluster - (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48767,7 +48767,7 @@ - (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48790,7 +48790,7 @@ + (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterSta - (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48803,7 +48803,7 @@ - (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48826,7 +48826,7 @@ + (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48839,7 +48839,7 @@ - (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48862,7 +48862,7 @@ + (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48875,7 +48875,7 @@ - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48898,7 +48898,7 @@ + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48911,7 +48911,7 @@ - (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48934,7 +48934,7 @@ + (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48947,7 +48947,7 @@ - (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -48970,7 +48970,7 @@ + (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -48983,7 +48983,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49006,7 +49006,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49019,7 +49019,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49042,7 +49042,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49055,7 +49055,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49078,7 +49078,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49091,7 +49091,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49114,7 +49114,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49127,7 +49127,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49150,7 +49150,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49163,7 +49163,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49205,7 +49205,7 @@ - (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ValveConfigurationAndControl::Commands::Open::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -49233,7 +49233,7 @@ - (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ValveConfigurationAndControl::Commands::Close::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -49247,7 +49247,7 @@ - (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nu - (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49260,7 +49260,7 @@ - (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49283,7 +49283,7 @@ + (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49319,7 +49319,7 @@ - (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value p nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -49329,7 +49329,7 @@ - (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49352,7 +49352,7 @@ + (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49365,7 +49365,7 @@ - (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49388,7 +49388,7 @@ + (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49401,7 +49401,7 @@ - (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49424,7 +49424,7 @@ + (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49437,7 +49437,7 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49460,7 +49460,7 @@ + (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49473,7 +49473,7 @@ - (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49496,7 +49496,7 @@ + (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49509,7 +49509,7 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49532,7 +49532,7 @@ + (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49545,7 +49545,7 @@ - (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49568,7 +49568,7 @@ + (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49599,7 +49599,7 @@ - (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -49609,7 +49609,7 @@ - (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49632,7 +49632,7 @@ + (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49645,7 +49645,7 @@ - (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49668,7 +49668,7 @@ + (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeLevelStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49681,7 +49681,7 @@ - (void)subscribeAttributeLevelStepWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49704,7 +49704,7 @@ + (void)readAttributeLevelStepWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49717,7 +49717,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49740,7 +49740,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49753,7 +49753,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49776,7 +49776,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49789,7 +49789,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49812,7 +49812,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49825,7 +49825,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49848,7 +49848,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49861,7 +49861,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49884,7 +49884,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49897,7 +49897,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49924,7 +49924,7 @@ @implementation MTRBaseClusterElectricalEnergyMeasurement - (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49937,7 +49937,7 @@ - (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49960,7 +49960,7 @@ + (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -49973,7 +49973,7 @@ - (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -49996,7 +49996,7 @@ + (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterSt - (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50009,7 +50009,7 @@ - (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50032,7 +50032,7 @@ + (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterSt - (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50045,7 +50045,7 @@ - (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams * reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50068,7 +50068,7 @@ + (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStat - (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50081,7 +50081,7 @@ - (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams * reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50104,7 +50104,7 @@ + (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50117,7 +50117,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50140,7 +50140,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50153,7 +50153,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50176,7 +50176,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50189,7 +50189,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50212,7 +50212,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50225,7 +50225,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50248,7 +50248,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50261,7 +50261,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50284,7 +50284,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50297,7 +50297,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50335,7 +50335,7 @@ - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadContro auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -50359,7 +50359,7 @@ - (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadCont auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -50383,7 +50383,7 @@ - (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlCluste auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -50407,7 +50407,7 @@ - (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -50435,7 +50435,7 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -50449,7 +50449,7 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu - (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50462,7 +50462,7 @@ - (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50485,7 +50485,7 @@ + (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50498,7 +50498,7 @@ - (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50521,7 +50521,7 @@ + (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRCluste - (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50534,7 +50534,7 @@ - (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50557,7 +50557,7 @@ + (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50570,7 +50570,7 @@ - (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50593,7 +50593,7 @@ + (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50606,7 +50606,7 @@ - (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50629,7 +50629,7 @@ + (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterSt - (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50642,7 +50642,7 @@ - (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50665,7 +50665,7 @@ + (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50696,7 +50696,7 @@ - (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50706,7 +50706,7 @@ - (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50729,7 +50729,7 @@ + (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50760,7 +50760,7 @@ - (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -50770,7 +50770,7 @@ - (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50793,7 +50793,7 @@ + (void)readAttributeDefaultRandomDurationWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50806,7 +50806,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50829,7 +50829,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50842,7 +50842,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50865,7 +50865,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50878,7 +50878,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50901,7 +50901,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50914,7 +50914,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50937,7 +50937,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50950,7 +50950,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -50973,7 +50973,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -50986,7 +50986,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51024,7 +51024,7 @@ - (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjus auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51052,7 +51052,7 @@ - (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCanc auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51076,7 +51076,7 @@ - (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51100,7 +51100,7 @@ - (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51128,7 +51128,7 @@ - (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51152,7 +51152,7 @@ - (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyF auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51176,7 +51176,7 @@ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClust auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51204,7 +51204,7 @@ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51218,7 +51218,7 @@ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestPa - (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51231,7 +51231,7 @@ - (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51254,7 +51254,7 @@ + (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51267,7 +51267,7 @@ - (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51290,7 +51290,7 @@ + (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51303,7 +51303,7 @@ - (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51326,7 +51326,7 @@ + (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51339,7 +51339,7 @@ - (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51362,7 +51362,7 @@ + (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51375,7 +51375,7 @@ - (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51398,7 +51398,7 @@ + (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51411,7 +51411,7 @@ - (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51434,7 +51434,7 @@ + (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterS - (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51447,7 +51447,7 @@ - (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51470,7 +51470,7 @@ + (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51483,7 +51483,7 @@ - (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51506,7 +51506,7 @@ + (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51519,7 +51519,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51542,7 +51542,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51555,7 +51555,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51578,7 +51578,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51591,7 +51591,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51614,7 +51614,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51627,7 +51627,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51650,7 +51650,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51663,7 +51663,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51686,7 +51686,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51699,7 +51699,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51744,7 +51744,7 @@ - (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params } using RequestType = EnergyEvse::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51771,7 +51771,7 @@ - (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)par } using RequestType = EnergyEvse::Commands::EnableCharging::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51798,7 +51798,7 @@ - (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams } using RequestType = EnergyEvse::Commands::EnableDischarging::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51829,7 +51829,7 @@ - (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * } using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51856,7 +51856,7 @@ - (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params comp } using RequestType = EnergyEvse::Commands::SetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51887,7 +51887,7 @@ - (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)p } using RequestType = EnergyEvse::Commands::GetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51918,7 +51918,7 @@ - (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullab } using RequestType = EnergyEvse::Commands::ClearTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -51932,7 +51932,7 @@ - (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullab - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51945,7 +51945,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -51968,7 +51968,7 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -51981,7 +51981,7 @@ - (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52004,7 +52004,7 @@ + (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52017,7 +52017,7 @@ - (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52040,7 +52040,7 @@ + (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52053,7 +52053,7 @@ - (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52076,7 +52076,7 @@ + (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateC - (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52089,7 +52089,7 @@ - (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52112,7 +52112,7 @@ + (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterSta - (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52125,7 +52125,7 @@ - (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52148,7 +52148,7 @@ + (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52161,7 +52161,7 @@ - (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52184,7 +52184,7 @@ + (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52197,7 +52197,7 @@ - (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52220,7 +52220,7 @@ + (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52233,7 +52233,7 @@ - (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52256,7 +52256,7 @@ + (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterSta - (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52287,7 +52287,7 @@ - (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -52297,7 +52297,7 @@ - (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52320,7 +52320,7 @@ + (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterSt - (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52351,7 +52351,7 @@ - (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -52361,7 +52361,7 @@ - (void)subscribeAttributeRandomizationDelayWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52384,7 +52384,7 @@ + (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterSt - (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52397,7 +52397,7 @@ - (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52420,7 +52420,7 @@ + (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52433,7 +52433,7 @@ - (void)subscribeAttributeNextChargeTargetTimeWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52456,7 +52456,7 @@ + (void)readAttributeNextChargeTargetTimeWithClusterStateCache:(MTRClusterStateC - (void)readAttributeNextChargeRequiredEnergyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52469,7 +52469,7 @@ - (void)subscribeAttributeNextChargeRequiredEnergyWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52492,7 +52492,7 @@ + (void)readAttributeNextChargeRequiredEnergyWithClusterStateCache:(MTRClusterSt - (void)readAttributeNextChargeTargetSoCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52505,7 +52505,7 @@ - (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52528,7 +52528,7 @@ + (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52564,7 +52564,7 @@ - (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)val nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -52574,7 +52574,7 @@ - (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52597,7 +52597,7 @@ + (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterSta - (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52610,7 +52610,7 @@ - (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52633,7 +52633,7 @@ + (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52646,7 +52646,7 @@ - (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52669,7 +52669,7 @@ + (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52682,7 +52682,7 @@ - (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52705,7 +52705,7 @@ + (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52718,7 +52718,7 @@ - (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52741,7 +52741,7 @@ + (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52754,7 +52754,7 @@ - (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52777,7 +52777,7 @@ + (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52790,7 +52790,7 @@ - (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52813,7 +52813,7 @@ + (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateC - (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52826,7 +52826,7 @@ - (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52849,7 +52849,7 @@ + (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(MTRClusterSta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52862,7 +52862,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52885,7 +52885,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52898,7 +52898,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52921,7 +52921,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52934,7 +52934,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52957,7 +52957,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -52970,7 +52970,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -52993,7 +52993,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53006,7 +53006,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53029,7 +53029,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53042,7 +53042,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53069,7 +53069,7 @@ @implementation MTRBaseClusterEnergyPreference - (void)readAttributeEnergyBalancesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53082,7 +53082,7 @@ - (void)subscribeAttributeEnergyBalancesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53105,7 +53105,7 @@ + (void)readAttributeEnergyBalancesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentEnergyBalanceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53136,7 +53136,7 @@ - (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53146,7 +53146,7 @@ - (void)subscribeAttributeCurrentEnergyBalanceWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53169,7 +53169,7 @@ + (void)readAttributeCurrentEnergyBalanceWithClusterStateCache:(MTRClusterStateC - (void)readAttributeEnergyPrioritiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53182,7 +53182,7 @@ - (void)subscribeAttributeEnergyPrioritiesWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53205,7 +53205,7 @@ + (void)readAttributeEnergyPrioritiesWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLowPowerModeSensitivitiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53218,7 +53218,7 @@ - (void)subscribeAttributeLowPowerModeSensitivitiesWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53241,7 +53241,7 @@ + (void)readAttributeLowPowerModeSensitivitiesWithClusterStateCache:(MTRClusterS - (void)readAttributeCurrentLowPowerModeSensitivityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53272,7 +53272,7 @@ - (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnu TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53282,7 +53282,7 @@ - (void)subscribeAttributeCurrentLowPowerModeSensitivityWithParams:(MTRSubscribe reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53305,7 +53305,7 @@ + (void)readAttributeCurrentLowPowerModeSensitivityWithClusterStateCache:(MTRClu - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53318,7 +53318,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53341,7 +53341,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53354,7 +53354,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53377,7 +53377,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53390,7 +53390,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53413,7 +53413,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53426,7 +53426,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53449,7 +53449,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53462,7 +53462,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53485,7 +53485,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53498,7 +53498,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53536,7 +53536,7 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = EnergyEvseMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -53550,7 +53550,7 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53563,7 +53563,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53586,7 +53586,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53599,7 +53599,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53622,7 +53622,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53658,7 +53658,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53668,7 +53668,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53691,7 +53691,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53727,7 +53727,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -53737,7 +53737,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53760,7 +53760,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53773,7 +53773,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53796,7 +53796,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53809,7 +53809,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53832,7 +53832,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53845,7 +53845,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53868,7 +53868,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53881,7 +53881,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53904,7 +53904,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53917,7 +53917,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53940,7 +53940,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -53953,7 +53953,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -53991,7 +53991,7 @@ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToMode auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagementMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54005,7 +54005,7 @@ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToMode - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54018,7 +54018,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54041,7 +54041,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54054,7 +54054,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54077,7 +54077,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54113,7 +54113,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -54123,7 +54123,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54146,7 +54146,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54182,7 +54182,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -54192,7 +54192,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54215,7 +54215,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54228,7 +54228,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54251,7 +54251,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54264,7 +54264,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54287,7 +54287,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54300,7 +54300,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54323,7 +54323,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54336,7 +54336,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54359,7 +54359,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54372,7 +54372,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54395,7 +54395,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54408,7 +54408,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -54453,7 +54453,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } using RequestType = DoorLock::Commands::LockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54484,7 +54484,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } using RequestType = DoorLock::Commands::UnlockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54511,7 +54511,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * } using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54535,7 +54535,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54559,7 +54559,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54583,7 +54583,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54607,7 +54607,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54631,7 +54631,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54655,7 +54655,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54679,7 +54679,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54703,7 +54703,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54727,7 +54727,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54754,7 +54754,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( } using RequestType = DoorLock::Commands::SetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54778,7 +54778,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:( auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54805,7 +54805,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi } using RequestType = DoorLock::Commands::ClearUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54832,7 +54832,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params } using RequestType = DoorLock::Commands::SetCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54856,7 +54856,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetCredentialStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54883,7 +54883,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par } using RequestType = DoorLock::Commands::ClearCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54914,7 +54914,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par } using RequestType = DoorLock::Commands::UnboltDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54941,7 +54941,7 @@ - (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigPa } using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54972,7 +54972,7 @@ - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConf } using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -54986,7 +54986,7 @@ - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConf - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -54999,7 +54999,7 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55022,7 +55022,7 @@ + (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55035,7 +55035,7 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55058,7 +55058,7 @@ + (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55071,7 +55071,7 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55094,7 +55094,7 @@ + (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55107,7 +55107,7 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55130,7 +55130,7 @@ + (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55161,7 +55161,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params: TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55171,7 +55171,7 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55194,7 +55194,7 @@ + (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55225,7 +55225,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55235,7 +55235,7 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55258,7 +55258,7 @@ + (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55289,7 +55289,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55299,7 +55299,7 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55322,7 +55322,7 @@ + (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55335,7 +55335,7 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55358,7 +55358,7 @@ + (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRCluste - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55371,7 +55371,7 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55394,7 +55394,7 @@ + (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterS - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55407,7 +55407,7 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55430,7 +55430,7 @@ + (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRCluster - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55443,7 +55443,7 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55466,7 +55466,7 @@ + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCac - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55479,7 +55479,7 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55502,7 +55502,7 @@ + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCac - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55515,7 +55515,7 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55538,7 +55538,7 @@ + (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTR - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55551,7 +55551,7 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55574,7 +55574,7 @@ + (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55587,7 +55587,7 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55610,7 +55610,7 @@ + (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55623,7 +55623,7 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55646,7 +55646,7 @@ + (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55659,7 +55659,7 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55682,7 +55682,7 @@ + (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55695,7 +55695,7 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55718,7 +55718,7 @@ + (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStat - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55731,7 +55731,7 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55754,7 +55754,7 @@ + (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(M - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55785,7 +55785,7 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55795,7 +55795,7 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55818,7 +55818,7 @@ + (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55849,7 +55849,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55859,7 +55859,7 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55882,7 +55882,7 @@ + (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55913,7 +55913,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params: TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55923,7 +55923,7 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -55946,7 +55946,7 @@ + (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -55977,7 +55977,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -55987,7 +55987,7 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56010,7 +56010,7 @@ + (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56041,7 +56041,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56051,7 +56051,7 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56074,7 +56074,7 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56087,7 +56087,7 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56110,7 +56110,7 @@ + (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterSta - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56123,7 +56123,7 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56146,7 +56146,7 @@ + (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClust - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56177,7 +56177,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56187,7 +56187,7 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56210,7 +56210,7 @@ + (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStat - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56241,7 +56241,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56251,7 +56251,7 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56274,7 +56274,7 @@ + (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterState - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56305,7 +56305,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56315,7 +56315,7 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56338,7 +56338,7 @@ + (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterState - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56369,7 +56369,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56379,7 +56379,7 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56402,7 +56402,7 @@ + (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterSta - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56433,7 +56433,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56443,7 +56443,7 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56466,7 +56466,7 @@ + (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterSt - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56497,7 +56497,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56507,7 +56507,7 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56530,7 +56530,7 @@ + (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56561,7 +56561,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56571,7 +56571,7 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56594,7 +56594,7 @@ + (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClust - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56625,7 +56625,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value para TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56635,7 +56635,7 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56658,7 +56658,7 @@ + (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56689,7 +56689,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56699,7 +56699,7 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56722,7 +56722,7 @@ + (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClust - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56753,7 +56753,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -56763,7 +56763,7 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56786,7 +56786,7 @@ + (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAliroReaderVerificationKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56799,7 +56799,7 @@ - (void)subscribeAttributeAliroReaderVerificationKeyWithParams:(MTRSubscribePara reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56822,7 +56822,7 @@ + (void)readAttributeAliroReaderVerificationKeyWithClusterStateCache:(MTRCluster - (void)readAttributeAliroReaderGroupIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56835,7 +56835,7 @@ - (void)subscribeAttributeAliroReaderGroupIdentifierWithParams:(MTRSubscribePara reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56858,7 +56858,7 @@ + (void)readAttributeAliroReaderGroupIdentifierWithClusterStateCache:(MTRCluster - (void)readAttributeAliroReaderGroupSubIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56871,7 +56871,7 @@ - (void)subscribeAttributeAliroReaderGroupSubIdentifierWithParams:(MTRSubscribeP reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56894,7 +56894,7 @@ + (void)readAttributeAliroReaderGroupSubIdentifierWithClusterStateCache:(MTRClus - (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56907,7 +56907,7 @@ - (void)subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWith reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56930,7 +56930,7 @@ + (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithClust - (void)readAttributeAliroGroupResolvingKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56943,7 +56943,7 @@ - (void)subscribeAttributeAliroGroupResolvingKeyWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -56966,7 +56966,7 @@ + (void)readAttributeAliroGroupResolvingKeyWithClusterStateCache:(MTRClusterStat - (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -56979,7 +56979,7 @@ - (void)subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRSub reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57002,7 +57002,7 @@ + (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithClusterStateCache:( - (void)readAttributeAliroBLEAdvertisingVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57015,7 +57015,7 @@ - (void)subscribeAttributeAliroBLEAdvertisingVersionWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57038,7 +57038,7 @@ + (void)readAttributeAliroBLEAdvertisingVersionWithClusterStateCache:(MTRCluster - (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57051,7 +57051,7 @@ - (void)subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:( reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57074,7 +57074,7 @@ + (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithClusterStateC - (void)readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57087,7 +57087,7 @@ - (void)subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57110,7 +57110,7 @@ + (void)readAttributeNumberOfAliroEndpointKeysSupportedWithClusterStateCache:(MT - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57123,7 +57123,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57146,7 +57146,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57159,7 +57159,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57182,7 +57182,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57195,7 +57195,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57218,7 +57218,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57231,7 +57231,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57254,7 +57254,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57267,7 +57267,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -57290,7 +57290,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -57303,7 +57303,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59044,7 +59044,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::UpOrOpen::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59072,7 +59072,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::DownOrClose::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59100,7 +59100,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::StopMotion::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59124,7 +59124,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToLiftValue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59148,7 +59148,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToLiftPercentage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59172,7 +59172,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToTiltValue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59196,7 +59196,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToTiltPercentage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -59210,7 +59210,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59223,7 +59223,7 @@ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59246,7 +59246,7 @@ + (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59259,7 +59259,7 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59282,7 +59282,7 @@ + (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(MTRClusterSta - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59295,7 +59295,7 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59318,7 +59318,7 @@ + (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(MTRClusterSta - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59331,7 +59331,7 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59354,7 +59354,7 @@ + (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59367,7 +59367,7 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59390,7 +59390,7 @@ + (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59403,7 +59403,7 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59426,7 +59426,7 @@ + (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStat - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59439,7 +59439,7 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59462,7 +59462,7 @@ + (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStat - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59475,7 +59475,7 @@ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59498,7 +59498,7 @@ + (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59511,7 +59511,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59534,7 +59534,7 @@ + (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(MTRClus - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59547,7 +59547,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59570,7 +59570,7 @@ + (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(MTRClus - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59583,7 +59583,7 @@ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59606,7 +59606,7 @@ + (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59619,7 +59619,7 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59642,7 +59642,7 @@ + (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache:(MTRCl - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59655,7 +59655,7 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59678,7 +59678,7 @@ + (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache:(MTRCl - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59691,7 +59691,7 @@ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59714,7 +59714,7 @@ + (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59727,7 +59727,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59750,7 +59750,7 @@ + (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache:(MTRC - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59763,7 +59763,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59786,7 +59786,7 @@ + (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache:(MTRC - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59799,7 +59799,7 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59822,7 +59822,7 @@ + (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(MTRClusterStat - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59835,7 +59835,7 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59858,7 +59858,7 @@ + (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterSt - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59871,7 +59871,7 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59894,7 +59894,7 @@ + (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(MTRClusterStat - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59907,7 +59907,7 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59930,7 +59930,7 @@ + (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterSt - (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -59961,7 +59961,7 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteP TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -59971,7 +59971,7 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -59994,7 +59994,7 @@ + (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *) - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60007,7 +60007,7 @@ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60030,7 +60030,7 @@ + (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60043,7 +60043,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60066,7 +60066,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60079,7 +60079,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60102,7 +60102,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60115,7 +60115,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60138,7 +60138,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60151,7 +60151,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60174,7 +60174,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60187,7 +60187,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -60210,7 +60210,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -60223,7 +60223,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61273,7 +61273,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -61301,7 +61301,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BarrierControl::Commands::BarrierControlStop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -61315,7 +61315,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61328,7 +61328,7 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61351,7 +61351,7 @@ + (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61364,7 +61364,7 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61387,7 +61387,7 @@ + (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61400,7 +61400,7 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61423,7 +61423,7 @@ + (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61454,7 +61454,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value para TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61464,7 +61464,7 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61487,7 +61487,7 @@ + (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61518,7 +61518,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61528,7 +61528,7 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61551,7 +61551,7 @@ + (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61582,7 +61582,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61592,7 +61592,7 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61615,7 +61615,7 @@ + (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterSt - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61646,7 +61646,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61656,7 +61656,7 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61679,7 +61679,7 @@ + (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterS - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61710,7 +61710,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value para TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61720,7 +61720,7 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61743,7 +61743,7 @@ + (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61774,7 +61774,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -61784,7 +61784,7 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61807,7 +61807,7 @@ + (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61820,7 +61820,7 @@ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61843,7 +61843,7 @@ + (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61856,7 +61856,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61879,7 +61879,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61892,7 +61892,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61915,7 +61915,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61928,7 +61928,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61951,7 +61951,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -61964,7 +61964,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -61987,7 +61987,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62000,7 +62000,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62023,7 +62023,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62036,7 +62036,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62662,7 +62662,7 @@ @implementation MTRBaseClusterPumpConfigurationAndControl - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62675,7 +62675,7 @@ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62698,7 +62698,7 @@ + (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62711,7 +62711,7 @@ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62734,7 +62734,7 @@ + (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62747,7 +62747,7 @@ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62770,7 +62770,7 @@ + (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62783,7 +62783,7 @@ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62806,7 +62806,7 @@ + (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62819,7 +62819,7 @@ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62842,7 +62842,7 @@ + (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62855,7 +62855,7 @@ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62878,7 +62878,7 @@ + (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62891,7 +62891,7 @@ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62914,7 +62914,7 @@ + (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62927,7 +62927,7 @@ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62950,7 +62950,7 @@ + (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62963,7 +62963,7 @@ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -62986,7 +62986,7 @@ + (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -62999,7 +62999,7 @@ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63022,7 +63022,7 @@ + (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63035,7 +63035,7 @@ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63058,7 +63058,7 @@ + (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63071,7 +63071,7 @@ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63094,7 +63094,7 @@ + (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63107,7 +63107,7 @@ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63130,7 +63130,7 @@ + (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63143,7 +63143,7 @@ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63166,7 +63166,7 @@ + (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63179,7 +63179,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63202,7 +63202,7 @@ + (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStat - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63215,7 +63215,7 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63238,7 +63238,7 @@ + (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateC - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63251,7 +63251,7 @@ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63274,7 +63274,7 @@ + (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63287,7 +63287,7 @@ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63310,7 +63310,7 @@ + (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63346,7 +63346,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -63356,7 +63356,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63379,7 +63379,7 @@ + (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateC - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63392,7 +63392,7 @@ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63415,7 +63415,7 @@ + (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63451,7 +63451,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -63461,7 +63461,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63484,7 +63484,7 @@ + (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStat - (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63515,7 +63515,7 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -63525,7 +63525,7 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63548,7 +63548,7 @@ + (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63579,7 +63579,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -63589,7 +63589,7 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63612,7 +63612,7 @@ + (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63625,7 +63625,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63648,7 +63648,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63661,7 +63661,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63684,7 +63684,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63697,7 +63697,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63720,7 +63720,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63733,7 +63733,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63756,7 +63756,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63769,7 +63769,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -63792,7 +63792,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -63805,7 +63805,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -64866,7 +64866,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetpointRaiseLower::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -64890,7 +64890,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -64914,7 +64914,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -64942,7 +64942,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::ClearWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -64966,7 +64966,7 @@ - (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveSchedul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetActiveScheduleRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -64990,7 +64990,7 @@ - (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetReq auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65014,7 +65014,7 @@ - (void)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPre auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::StartPresetsSchedulesEditRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65042,7 +65042,7 @@ - (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CancelPresetsSchedulesEditRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65070,7 +65070,7 @@ - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPrese auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CommitPresetsSchedulesRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65098,7 +65098,7 @@ - (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetAct auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65122,7 +65122,7 @@ - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTempe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -65136,7 +65136,7 @@ - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTempe - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65149,7 +65149,7 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65172,7 +65172,7 @@ + (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65185,7 +65185,7 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65208,7 +65208,7 @@ + (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65221,7 +65221,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65244,7 +65244,7 @@ + (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65257,7 +65257,7 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65280,7 +65280,7 @@ + (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterSta - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65293,7 +65293,7 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65316,7 +65316,7 @@ + (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterSta - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65329,7 +65329,7 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65352,7 +65352,7 @@ + (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterSta - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65365,7 +65365,7 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65388,7 +65388,7 @@ + (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterSta - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65401,7 +65401,7 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65424,7 +65424,7 @@ + (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65437,7 +65437,7 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65460,7 +65460,7 @@ + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65491,7 +65491,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65501,7 +65501,7 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65524,7 +65524,7 @@ + (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRCluste - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65555,7 +65555,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65565,7 +65565,7 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65588,7 +65588,7 @@ + (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRCluste - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65619,7 +65619,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65629,7 +65629,7 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65652,7 +65652,7 @@ + (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterSta - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65683,7 +65683,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65693,7 +65693,7 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65716,7 +65716,7 @@ + (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterSta - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65747,7 +65747,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65757,7 +65757,7 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65780,7 +65780,7 @@ + (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterS - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65811,7 +65811,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65821,7 +65821,7 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65844,7 +65844,7 @@ + (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterS - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65875,7 +65875,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65885,7 +65885,7 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65908,7 +65908,7 @@ + (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -65939,7 +65939,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -65949,7 +65949,7 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -65972,7 +65972,7 @@ + (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66003,7 +66003,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66013,7 +66013,7 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66036,7 +66036,7 @@ + (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66067,7 +66067,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66077,7 +66077,7 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66100,7 +66100,7 @@ + (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateC - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66131,7 +66131,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66141,7 +66141,7 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66164,7 +66164,7 @@ + (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66195,7 +66195,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66205,7 +66205,7 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66228,7 +66228,7 @@ + (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66259,7 +66259,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66269,7 +66269,7 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66292,7 +66292,7 @@ + (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRCluster - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66323,7 +66323,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66333,7 +66333,7 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66356,7 +66356,7 @@ + (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66369,7 +66369,7 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66392,7 +66392,7 @@ + (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterState - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66405,7 +66405,7 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66428,7 +66428,7 @@ + (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66441,7 +66441,7 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66464,7 +66464,7 @@ + (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterS - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66477,7 +66477,7 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66500,7 +66500,7 @@ + (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterSt - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66531,7 +66531,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66541,7 +66541,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66564,7 +66564,7 @@ + (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterSta - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66600,7 +66600,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66610,7 +66610,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66633,7 +66633,7 @@ + (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRCl - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66664,7 +66664,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66674,7 +66674,7 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66697,7 +66697,7 @@ + (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MT - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66710,7 +66710,7 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66733,7 +66733,7 @@ + (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStat - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66746,7 +66746,7 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66769,7 +66769,7 @@ + (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateC - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66782,7 +66782,7 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66805,7 +66805,7 @@ + (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateC - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66818,7 +66818,7 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66841,7 +66841,7 @@ + (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClus - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66877,7 +66877,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value param nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -66887,7 +66887,7 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66910,7 +66910,7 @@ + (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66923,7 +66923,7 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66946,7 +66946,7 @@ + (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -66959,7 +66959,7 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -66982,7 +66982,7 @@ + (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67018,7 +67018,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value par nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67028,7 +67028,7 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67051,7 +67051,7 @@ + (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67064,7 +67064,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67087,7 +67087,7 @@ + (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateC - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67100,7 +67100,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67123,7 +67123,7 @@ + (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateC - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67154,7 +67154,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67164,7 +67164,7 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67187,7 +67187,7 @@ + (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67218,7 +67218,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67228,7 +67228,7 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67251,7 +67251,7 @@ + (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67282,7 +67282,7 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67292,7 +67292,7 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67315,7 +67315,7 @@ + (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67346,7 +67346,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value para TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67356,7 +67356,7 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67379,7 +67379,7 @@ + (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67410,7 +67410,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67420,7 +67420,7 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67443,7 +67443,7 @@ + (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67474,7 +67474,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67484,7 +67484,7 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67507,7 +67507,7 @@ + (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67538,7 +67538,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67548,7 +67548,7 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67571,7 +67571,7 @@ + (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67584,7 +67584,7 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67607,7 +67607,7 @@ + (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67638,7 +67638,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -67648,7 +67648,7 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67671,7 +67671,7 @@ + (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePresetTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67684,7 +67684,7 @@ - (void)subscribeAttributePresetTypesWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67707,7 +67707,7 @@ + (void)readAttributePresetTypesWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeScheduleTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67720,7 +67720,7 @@ - (void)subscribeAttributeScheduleTypesWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67743,7 +67743,7 @@ + (void)readAttributeScheduleTypesWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeNumberOfPresetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67756,7 +67756,7 @@ - (void)subscribeAttributeNumberOfPresetsWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67779,7 +67779,7 @@ + (void)readAttributeNumberOfPresetsWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeNumberOfSchedulesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67792,7 +67792,7 @@ - (void)subscribeAttributeNumberOfSchedulesWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67815,7 +67815,7 @@ + (void)readAttributeNumberOfSchedulesWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeNumberOfScheduleTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67828,7 +67828,7 @@ - (void)subscribeAttributeNumberOfScheduleTransitionsWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67851,7 +67851,7 @@ + (void)readAttributeNumberOfScheduleTransitionsWithClusterStateCache:(MTRCluste - (void)readAttributeNumberOfScheduleTransitionPerDayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67864,7 +67864,7 @@ - (void)subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67887,7 +67887,7 @@ + (void)readAttributeNumberOfScheduleTransitionPerDayWithClusterStateCache:(MTRC - (void)readAttributeActivePresetHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67900,7 +67900,7 @@ - (void)subscribeAttributeActivePresetHandleWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67923,7 +67923,7 @@ + (void)readAttributeActivePresetHandleWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeActiveScheduleHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -67936,7 +67936,7 @@ - (void)subscribeAttributeActiveScheduleHandleWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -67959,7 +67959,7 @@ + (void)readAttributeActiveScheduleHandleWithClusterStateCache:(MTRClusterStateC - (void)readAttributePresetsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68040,7 +68040,7 @@ - (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value params:(MTRWrit } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -68050,7 +68050,7 @@ - (void)subscribeAttributePresetsWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68073,7 +68073,7 @@ + (void)readAttributePresetsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeSchedulesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68187,7 +68187,7 @@ - (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value params:(MTRWr } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -68197,7 +68197,7 @@ - (void)subscribeAttributeSchedulesWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68220,7 +68220,7 @@ + (void)readAttributeSchedulesWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePresetsSchedulesEditableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::PresetsSchedulesEditable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68233,7 +68233,7 @@ - (void)subscribeAttributePresetsSchedulesEditableWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::PresetsSchedulesEditable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68256,7 +68256,7 @@ + (void)readAttributePresetsSchedulesEditableWithClusterStateCache:(MTRClusterSt - (void)readAttributeTemperatureSetpointHoldPolicyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldPolicy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68269,7 +68269,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldPolicyWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldPolicy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68292,7 +68292,7 @@ + (void)readAttributeTemperatureSetpointHoldPolicyWithClusterStateCache:(MTRClus - (void)readAttributeSetpointHoldExpiryTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68305,7 +68305,7 @@ - (void)subscribeAttributeSetpointHoldExpiryTimestampWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68328,7 +68328,7 @@ + (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRCluste - (void)readAttributeQueuedPresetWithCompletion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68341,7 +68341,7 @@ - (void)subscribeAttributeQueuedPresetWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68364,7 +68364,7 @@ + (void)readAttributeQueuedPresetWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68377,7 +68377,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68400,7 +68400,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68413,7 +68413,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68436,7 +68436,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68449,7 +68449,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68472,7 +68472,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68485,7 +68485,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68508,7 +68508,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68521,7 +68521,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -68544,7 +68544,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -68557,7 +68557,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -70740,7 +70740,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRS auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = FanControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -70754,7 +70754,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRS - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -70785,7 +70785,7 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -70795,7 +70795,7 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -70818,7 +70818,7 @@ + (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -70849,7 +70849,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -70859,7 +70859,7 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -70882,7 +70882,7 @@ + (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -70918,7 +70918,7 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -70928,7 +70928,7 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -70951,7 +70951,7 @@ + (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -70964,7 +70964,7 @@ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -70987,7 +70987,7 @@ + (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71000,7 +71000,7 @@ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71023,7 +71023,7 @@ + (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71059,7 +71059,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:( nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -71069,7 +71069,7 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71092,7 +71092,7 @@ + (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71105,7 +71105,7 @@ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71128,7 +71128,7 @@ + (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71141,7 +71141,7 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71164,7 +71164,7 @@ + (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71195,7 +71195,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -71205,7 +71205,7 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71228,7 +71228,7 @@ + (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71241,7 +71241,7 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71264,7 +71264,7 @@ + (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71295,7 +71295,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -71305,7 +71305,7 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71328,7 +71328,7 @@ + (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71359,7 +71359,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value param TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -71369,7 +71369,7 @@ - (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71392,7 +71392,7 @@ + (void)readAttributeAirflowDirectionWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71405,7 +71405,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71428,7 +71428,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71441,7 +71441,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71464,7 +71464,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71477,7 +71477,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71500,7 +71500,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71513,7 +71513,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71536,7 +71536,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71549,7 +71549,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -71572,7 +71572,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -71585,7 +71585,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72231,7 +72231,7 @@ @implementation MTRBaseClusterThermostatUserInterfaceConfiguration - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72262,7 +72262,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -72272,7 +72272,7 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72295,7 +72295,7 @@ + (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStat - (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72326,7 +72326,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -72336,7 +72336,7 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72359,7 +72359,7 @@ + (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72390,7 +72390,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -72400,7 +72400,7 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72423,7 +72423,7 @@ + (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClus - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72436,7 +72436,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72459,7 +72459,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72472,7 +72472,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72495,7 +72495,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72508,7 +72508,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72531,7 +72531,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72544,7 +72544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72567,7 +72567,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72580,7 +72580,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72603,7 +72603,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -72616,7 +72616,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -72969,7 +72969,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -72993,7 +72993,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73017,7 +73017,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73041,7 +73041,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73065,7 +73065,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73089,7 +73089,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73113,7 +73113,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73137,7 +73137,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73161,7 +73161,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73185,7 +73185,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73209,7 +73209,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73233,7 +73233,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73257,7 +73257,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73281,7 +73281,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedStepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73305,7 +73305,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73329,7 +73329,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::ColorLoopSet::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73353,7 +73353,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StopMoveStep::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73377,7 +73377,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73401,7 +73401,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -73415,7 +73415,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73428,7 +73428,7 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73451,7 +73451,7 @@ + (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73464,7 +73464,7 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73487,7 +73487,7 @@ + (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73500,7 +73500,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73523,7 +73523,7 @@ + (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73536,7 +73536,7 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73559,7 +73559,7 @@ + (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73572,7 +73572,7 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73595,7 +73595,7 @@ + (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73608,7 +73608,7 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73631,7 +73631,7 @@ + (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73644,7 +73644,7 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73667,7 +73667,7 @@ + (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73680,7 +73680,7 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73703,7 +73703,7 @@ + (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStat - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73716,7 +73716,7 @@ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73739,7 +73739,7 @@ + (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73770,7 +73770,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -73780,7 +73780,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73803,7 +73803,7 @@ + (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73816,7 +73816,7 @@ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73839,7 +73839,7 @@ + (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73852,7 +73852,7 @@ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73875,7 +73875,7 @@ + (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73888,7 +73888,7 @@ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73911,7 +73911,7 @@ + (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73924,7 +73924,7 @@ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73947,7 +73947,7 @@ + (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73960,7 +73960,7 @@ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -73983,7 +73983,7 @@ + (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -73996,7 +73996,7 @@ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74019,7 +74019,7 @@ + (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74032,7 +74032,7 @@ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74055,7 +74055,7 @@ + (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74068,7 +74068,7 @@ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74091,7 +74091,7 @@ + (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74104,7 +74104,7 @@ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74127,7 +74127,7 @@ + (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74140,7 +74140,7 @@ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74163,7 +74163,7 @@ + (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74176,7 +74176,7 @@ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74199,7 +74199,7 @@ + (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74212,7 +74212,7 @@ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74235,7 +74235,7 @@ + (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74248,7 +74248,7 @@ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74271,7 +74271,7 @@ + (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74284,7 +74284,7 @@ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74307,7 +74307,7 @@ + (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74320,7 +74320,7 @@ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74343,7 +74343,7 @@ + (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74356,7 +74356,7 @@ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74379,7 +74379,7 @@ + (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74392,7 +74392,7 @@ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74415,7 +74415,7 @@ + (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74428,7 +74428,7 @@ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74451,7 +74451,7 @@ + (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74464,7 +74464,7 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74487,7 +74487,7 @@ + (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74518,7 +74518,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74528,7 +74528,7 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74551,7 +74551,7 @@ + (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74582,7 +74582,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74592,7 +74592,7 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74615,7 +74615,7 @@ + (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74646,7 +74646,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74656,7 +74656,7 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74679,7 +74679,7 @@ + (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74710,7 +74710,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74720,7 +74720,7 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74743,7 +74743,7 @@ + (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74779,7 +74779,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74789,7 +74789,7 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74812,7 +74812,7 @@ + (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateC - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74843,7 +74843,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74853,7 +74853,7 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74876,7 +74876,7 @@ + (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74907,7 +74907,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74917,7 +74917,7 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -74940,7 +74940,7 @@ + (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -74976,7 +74976,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -74986,7 +74986,7 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75009,7 +75009,7 @@ + (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateC - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75040,7 +75040,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -75050,7 +75050,7 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75073,7 +75073,7 @@ + (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75104,7 +75104,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(M TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -75114,7 +75114,7 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75137,7 +75137,7 @@ + (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75173,7 +75173,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -75183,7 +75183,7 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75206,7 +75206,7 @@ + (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateC - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75219,7 +75219,7 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75242,7 +75242,7 @@ + (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75255,7 +75255,7 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75278,7 +75278,7 @@ + (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75291,7 +75291,7 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75314,7 +75314,7 @@ + (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75327,7 +75327,7 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75350,7 +75350,7 @@ + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75363,7 +75363,7 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75386,7 +75386,7 @@ + (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75399,7 +75399,7 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75422,7 +75422,7 @@ + (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterS - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75435,7 +75435,7 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75458,7 +75458,7 @@ + (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRCluster - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75471,7 +75471,7 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75494,7 +75494,7 @@ + (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75507,7 +75507,7 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75530,7 +75530,7 @@ + (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRCluster - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75543,7 +75543,7 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75566,7 +75566,7 @@ + (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRCluster - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75579,7 +75579,7 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75602,7 +75602,7 @@ + (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:(MTRCl - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75638,7 +75638,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -75648,7 +75648,7 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75671,7 +75671,7 @@ + (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClus - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75684,7 +75684,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75707,7 +75707,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75720,7 +75720,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75743,7 +75743,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75756,7 +75756,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75779,7 +75779,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75792,7 +75792,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75815,7 +75815,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75828,7 +75828,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -75851,7 +75851,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -75864,7 +75864,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78097,7 +78097,7 @@ @implementation MTRBaseClusterBallastConfiguration - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78110,7 +78110,7 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78133,7 +78133,7 @@ + (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78146,7 +78146,7 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78169,7 +78169,7 @@ + (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78182,7 +78182,7 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78205,7 +78205,7 @@ + (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78236,7 +78236,7 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78246,7 +78246,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78269,7 +78269,7 @@ + (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78300,7 +78300,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78310,7 +78310,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78333,7 +78333,7 @@ + (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78369,7 +78369,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78379,7 +78379,7 @@ - (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78402,7 +78402,7 @@ + (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStat - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78438,7 +78438,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78448,7 +78448,7 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78471,7 +78471,7 @@ + (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterSta - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78484,7 +78484,7 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78507,7 +78507,7 @@ + (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78538,7 +78538,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78548,7 +78548,7 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78571,7 +78571,7 @@ + (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78602,7 +78602,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value param TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78612,7 +78612,7 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78635,7 +78635,7 @@ + (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78671,7 +78671,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78681,7 +78681,7 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78704,7 +78704,7 @@ + (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78740,7 +78740,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params: nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78750,7 +78750,7 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78773,7 +78773,7 @@ + (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78804,7 +78804,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78814,7 +78814,7 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78837,7 +78837,7 @@ + (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78873,7 +78873,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -78883,7 +78883,7 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78906,7 +78906,7 @@ + (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78919,7 +78919,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78942,7 +78942,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78955,7 +78955,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -78978,7 +78978,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -78991,7 +78991,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79014,7 +79014,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79027,7 +79027,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79050,7 +79050,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79063,7 +79063,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79086,7 +79086,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79099,7 +79099,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79882,7 +79882,7 @@ @implementation MTRBaseClusterIlluminanceMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79895,7 +79895,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79918,7 +79918,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79931,7 +79931,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79954,7 +79954,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -79967,7 +79967,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -79990,7 +79990,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80003,7 +80003,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80026,7 +80026,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80039,7 +80039,7 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80062,7 +80062,7 @@ + (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80075,7 +80075,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80098,7 +80098,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80111,7 +80111,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80134,7 +80134,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80147,7 +80147,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80170,7 +80170,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80183,7 +80183,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80206,7 +80206,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80219,7 +80219,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80242,7 +80242,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80255,7 +80255,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80643,7 +80643,7 @@ @implementation MTRBaseClusterTemperatureMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80656,7 +80656,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80679,7 +80679,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80692,7 +80692,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80715,7 +80715,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80728,7 +80728,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80751,7 +80751,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80764,7 +80764,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80787,7 +80787,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80800,7 +80800,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80823,7 +80823,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80836,7 +80836,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80859,7 +80859,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80872,7 +80872,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80895,7 +80895,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80908,7 +80908,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80931,7 +80931,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80944,7 +80944,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -80967,7 +80967,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -80980,7 +80980,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81333,7 +81333,7 @@ @implementation MTRBaseClusterPressureMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81346,7 +81346,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81369,7 +81369,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81382,7 +81382,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81405,7 +81405,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81418,7 +81418,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81441,7 +81441,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81454,7 +81454,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81477,7 +81477,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81490,7 +81490,7 @@ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81513,7 +81513,7 @@ + (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81526,7 +81526,7 @@ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81549,7 +81549,7 @@ + (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81562,7 +81562,7 @@ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81585,7 +81585,7 @@ + (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81598,7 +81598,7 @@ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81621,7 +81621,7 @@ + (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81634,7 +81634,7 @@ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81657,7 +81657,7 @@ + (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81670,7 +81670,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81693,7 +81693,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81706,7 +81706,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81729,7 +81729,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81742,7 +81742,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81765,7 +81765,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81778,7 +81778,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81801,7 +81801,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81814,7 +81814,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -81837,7 +81837,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -81850,7 +81850,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82378,7 +82378,7 @@ @implementation MTRBaseClusterFlowMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82391,7 +82391,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82414,7 +82414,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82427,7 +82427,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82450,7 +82450,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82463,7 +82463,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82486,7 +82486,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82499,7 +82499,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82522,7 +82522,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82535,7 +82535,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82558,7 +82558,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82571,7 +82571,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82594,7 +82594,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82607,7 +82607,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82630,7 +82630,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82643,7 +82643,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82666,7 +82666,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82679,7 +82679,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -82702,7 +82702,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -82715,7 +82715,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83068,7 +83068,7 @@ @implementation MTRBaseClusterRelativeHumidityMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83081,7 +83081,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83104,7 +83104,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83117,7 +83117,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83140,7 +83140,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83153,7 +83153,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83176,7 +83176,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83189,7 +83189,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83212,7 +83212,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83225,7 +83225,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83248,7 +83248,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83261,7 +83261,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83284,7 +83284,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83297,7 +83297,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83320,7 +83320,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83333,7 +83333,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83356,7 +83356,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83369,7 +83369,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83392,7 +83392,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83405,7 +83405,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83758,7 +83758,7 @@ @implementation MTRBaseClusterOccupancySensing - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83771,7 +83771,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83794,7 +83794,7 @@ + (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83807,7 +83807,7 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83830,7 +83830,7 @@ + (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83843,7 +83843,7 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83866,7 +83866,7 @@ + (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterS - (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83897,7 +83897,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -83907,7 +83907,7 @@ - (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83930,7 +83930,7 @@ + (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClust - (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -83961,7 +83961,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -83971,7 +83971,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -83994,7 +83994,7 @@ + (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClust - (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84025,7 +84025,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84035,7 +84035,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84058,7 +84058,7 @@ + (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRC - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84089,7 +84089,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84099,7 +84099,7 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84122,7 +84122,7 @@ + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:(M - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84153,7 +84153,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84163,7 +84163,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84186,7 +84186,7 @@ + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:(M - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84217,7 +84217,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84227,7 +84227,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84250,7 +84250,7 @@ + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCach - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84281,7 +84281,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84291,7 +84291,7 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84314,7 +84314,7 @@ + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCac - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84345,7 +84345,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84355,7 +84355,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84378,7 +84378,7 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCac - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84409,7 +84409,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -84419,7 +84419,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84442,7 +84442,7 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84455,7 +84455,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84478,7 +84478,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84491,7 +84491,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84514,7 +84514,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84527,7 +84527,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84550,7 +84550,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84563,7 +84563,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84586,7 +84586,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84599,7 +84599,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -84622,7 +84622,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -84635,7 +84635,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85340,7 +85340,7 @@ @implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85353,7 +85353,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85376,7 +85376,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85389,7 +85389,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85412,7 +85412,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85425,7 +85425,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85448,7 +85448,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85461,7 +85461,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85484,7 +85484,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85497,7 +85497,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85520,7 +85520,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85533,7 +85533,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85556,7 +85556,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85569,7 +85569,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85592,7 +85592,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85605,7 +85605,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85628,7 +85628,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85641,7 +85641,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85664,7 +85664,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85677,7 +85677,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85700,7 +85700,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85713,7 +85713,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85736,7 +85736,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85749,7 +85749,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85772,7 +85772,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85785,7 +85785,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85808,7 +85808,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85821,7 +85821,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85844,7 +85844,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85857,7 +85857,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85880,7 +85880,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85893,7 +85893,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85916,7 +85916,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85929,7 +85929,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85956,7 +85956,7 @@ @implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -85969,7 +85969,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -85992,7 +85992,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86005,7 +86005,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86028,7 +86028,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86041,7 +86041,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86064,7 +86064,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86077,7 +86077,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86100,7 +86100,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86113,7 +86113,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86136,7 +86136,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86149,7 +86149,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86172,7 +86172,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86185,7 +86185,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86208,7 +86208,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86221,7 +86221,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86244,7 +86244,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86257,7 +86257,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86280,7 +86280,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86293,7 +86293,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86316,7 +86316,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86329,7 +86329,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86352,7 +86352,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86365,7 +86365,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86388,7 +86388,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86401,7 +86401,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86424,7 +86424,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86437,7 +86437,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86460,7 +86460,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86473,7 +86473,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86496,7 +86496,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86509,7 +86509,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86532,7 +86532,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86545,7 +86545,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86572,7 +86572,7 @@ @implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86585,7 +86585,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86608,7 +86608,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86621,7 +86621,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86644,7 +86644,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86657,7 +86657,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86680,7 +86680,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86693,7 +86693,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86716,7 +86716,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86729,7 +86729,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86752,7 +86752,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86765,7 +86765,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86788,7 +86788,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86801,7 +86801,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86824,7 +86824,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86837,7 +86837,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86860,7 +86860,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86873,7 +86873,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86896,7 +86896,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86909,7 +86909,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86932,7 +86932,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86945,7 +86945,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -86968,7 +86968,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -86981,7 +86981,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87004,7 +87004,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87017,7 +87017,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87040,7 +87040,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87053,7 +87053,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87076,7 +87076,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87089,7 +87089,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87112,7 +87112,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87125,7 +87125,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87148,7 +87148,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87161,7 +87161,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87188,7 +87188,7 @@ @implementation MTRBaseClusterOzoneConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87201,7 +87201,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87224,7 +87224,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87237,7 +87237,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87260,7 +87260,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87273,7 +87273,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87296,7 +87296,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87309,7 +87309,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87332,7 +87332,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87345,7 +87345,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87368,7 +87368,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87381,7 +87381,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87404,7 +87404,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87417,7 +87417,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87440,7 +87440,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87453,7 +87453,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87476,7 +87476,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87489,7 +87489,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87512,7 +87512,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87525,7 +87525,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87548,7 +87548,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87561,7 +87561,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87584,7 +87584,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87597,7 +87597,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87620,7 +87620,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87633,7 +87633,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87656,7 +87656,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87669,7 +87669,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87692,7 +87692,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87705,7 +87705,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87728,7 +87728,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87741,7 +87741,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87764,7 +87764,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87777,7 +87777,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87804,7 +87804,7 @@ @implementation MTRBaseClusterPM25ConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87817,7 +87817,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87840,7 +87840,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87853,7 +87853,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87876,7 +87876,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87889,7 +87889,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87912,7 +87912,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87925,7 +87925,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87948,7 +87948,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87961,7 +87961,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -87984,7 +87984,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -87997,7 +87997,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88020,7 +88020,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88033,7 +88033,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88056,7 +88056,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88069,7 +88069,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88092,7 +88092,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88105,7 +88105,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88128,7 +88128,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88141,7 +88141,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88164,7 +88164,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88177,7 +88177,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88200,7 +88200,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88213,7 +88213,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88236,7 +88236,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88249,7 +88249,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88272,7 +88272,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88285,7 +88285,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88308,7 +88308,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88321,7 +88321,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88344,7 +88344,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88357,7 +88357,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88380,7 +88380,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88393,7 +88393,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88420,7 +88420,7 @@ @implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88433,7 +88433,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88456,7 +88456,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88469,7 +88469,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88492,7 +88492,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88505,7 +88505,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88528,7 +88528,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88541,7 +88541,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88564,7 +88564,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88577,7 +88577,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88600,7 +88600,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88613,7 +88613,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88636,7 +88636,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88649,7 +88649,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88672,7 +88672,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88685,7 +88685,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88708,7 +88708,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88721,7 +88721,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88744,7 +88744,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88757,7 +88757,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88780,7 +88780,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88793,7 +88793,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88816,7 +88816,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88829,7 +88829,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88852,7 +88852,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88865,7 +88865,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88888,7 +88888,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88901,7 +88901,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88924,7 +88924,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88937,7 +88937,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88960,7 +88960,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -88973,7 +88973,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -88996,7 +88996,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89009,7 +89009,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89036,7 +89036,7 @@ @implementation MTRBaseClusterPM1ConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89049,7 +89049,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89072,7 +89072,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89085,7 +89085,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89108,7 +89108,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89121,7 +89121,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89144,7 +89144,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89157,7 +89157,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89180,7 +89180,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89193,7 +89193,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89216,7 +89216,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89229,7 +89229,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89252,7 +89252,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89265,7 +89265,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89288,7 +89288,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89301,7 +89301,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89324,7 +89324,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89337,7 +89337,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89360,7 +89360,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89373,7 +89373,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89396,7 +89396,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89409,7 +89409,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89432,7 +89432,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89445,7 +89445,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89468,7 +89468,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89481,7 +89481,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89504,7 +89504,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89517,7 +89517,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89540,7 +89540,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89553,7 +89553,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89576,7 +89576,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89589,7 +89589,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89612,7 +89612,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89625,7 +89625,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89652,7 +89652,7 @@ @implementation MTRBaseClusterPM10ConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89665,7 +89665,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89688,7 +89688,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89701,7 +89701,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89724,7 +89724,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89737,7 +89737,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89760,7 +89760,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89773,7 +89773,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89796,7 +89796,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89809,7 +89809,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89832,7 +89832,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89845,7 +89845,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89868,7 +89868,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89881,7 +89881,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89904,7 +89904,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89917,7 +89917,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89940,7 +89940,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89953,7 +89953,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -89976,7 +89976,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -89989,7 +89989,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90012,7 +90012,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90025,7 +90025,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90048,7 +90048,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90061,7 +90061,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90084,7 +90084,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90097,7 +90097,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90120,7 +90120,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90133,7 +90133,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90156,7 +90156,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90169,7 +90169,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90192,7 +90192,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90205,7 +90205,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90228,7 +90228,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90241,7 +90241,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90268,7 +90268,7 @@ @implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurem - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90281,7 +90281,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90304,7 +90304,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90317,7 +90317,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90340,7 +90340,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90353,7 +90353,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90376,7 +90376,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90389,7 +90389,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90412,7 +90412,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90425,7 +90425,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90448,7 +90448,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90461,7 +90461,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90484,7 +90484,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90497,7 +90497,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90520,7 +90520,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90533,7 +90533,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90556,7 +90556,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90569,7 +90569,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90592,7 +90592,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90605,7 +90605,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90628,7 +90628,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90641,7 +90641,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90664,7 +90664,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90677,7 +90677,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90700,7 +90700,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90713,7 +90713,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90736,7 +90736,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90749,7 +90749,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90772,7 +90772,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90785,7 +90785,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90808,7 +90808,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90821,7 +90821,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90844,7 +90844,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90857,7 +90857,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90884,7 +90884,7 @@ @implementation MTRBaseClusterRadonConcentrationMeasurement - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90897,7 +90897,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90920,7 +90920,7 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90933,7 +90933,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90956,7 +90956,7 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -90969,7 +90969,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -90992,7 +90992,7 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91005,7 +91005,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91028,7 +91028,7 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91041,7 +91041,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91064,7 +91064,7 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91077,7 +91077,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91100,7 +91100,7 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91113,7 +91113,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91136,7 +91136,7 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91149,7 +91149,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91172,7 +91172,7 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91185,7 +91185,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91208,7 +91208,7 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91221,7 +91221,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91244,7 +91244,7 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91257,7 +91257,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91280,7 +91280,7 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91293,7 +91293,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91316,7 +91316,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91329,7 +91329,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91352,7 +91352,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91365,7 +91365,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91388,7 +91388,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91401,7 +91401,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91424,7 +91424,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91437,7 +91437,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91460,7 +91460,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91473,7 +91473,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91500,7 +91500,7 @@ @implementation MTRBaseClusterWakeOnLAN - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91513,7 +91513,7 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91536,7 +91536,7 @@ + (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeLinkLocalAddressWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91549,7 +91549,7 @@ - (void)subscribeAttributeLinkLocalAddressWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91572,7 +91572,7 @@ + (void)readAttributeLinkLocalAddressWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91585,7 +91585,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91608,7 +91608,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91621,7 +91621,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91644,7 +91644,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91657,7 +91657,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91680,7 +91680,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91693,7 +91693,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91716,7 +91716,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91729,7 +91729,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -91752,7 +91752,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -91765,7 +91765,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92027,7 +92027,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::ChangeChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92051,7 +92051,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::ChangeChannelByNumber::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92075,7 +92075,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::SkipChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92103,7 +92103,7 @@ - (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::GetProgramGuide::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92127,7 +92127,7 @@ - (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::RecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92151,7 +92151,7 @@ - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::CancelRecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92165,7 +92165,7 @@ - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParam - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92178,7 +92178,7 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92201,7 +92201,7 @@ + (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92214,7 +92214,7 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92237,7 +92237,7 @@ + (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92250,7 +92250,7 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92273,7 +92273,7 @@ + (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92286,7 +92286,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92309,7 +92309,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92322,7 +92322,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92345,7 +92345,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92358,7 +92358,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92381,7 +92381,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92394,7 +92394,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92417,7 +92417,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92430,7 +92430,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92453,7 +92453,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92466,7 +92466,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92814,7 +92814,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TargetNavigator::Commands::NavigateTarget::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -92828,7 +92828,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92841,7 +92841,7 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92864,7 +92864,7 @@ + (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92877,7 +92877,7 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92900,7 +92900,7 @@ + (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92913,7 +92913,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92936,7 +92936,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92949,7 +92949,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -92972,7 +92972,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -92985,7 +92985,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93008,7 +93008,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93021,7 +93021,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93044,7 +93044,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93057,7 +93057,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93080,7 +93080,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93093,7 +93093,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93400,7 +93400,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Play::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93428,7 +93428,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93456,7 +93456,7 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93484,7 +93484,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::StartOver::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93512,7 +93512,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Previous::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93540,7 +93540,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Next::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93568,7 +93568,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Rewind::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93596,7 +93596,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::FastForward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93620,7 +93620,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::SkipForward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93644,7 +93644,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::SkipBackward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93668,7 +93668,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completion:(v auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Seek::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93692,7 +93692,7 @@ - (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93716,7 +93716,7 @@ - (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93744,7 +93744,7 @@ - (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrac auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -93758,7 +93758,7 @@ - (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrac - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93771,7 +93771,7 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93794,7 +93794,7 @@ + (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93807,7 +93807,7 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93830,7 +93830,7 @@ + (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93843,7 +93843,7 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93866,7 +93866,7 @@ + (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93879,7 +93879,7 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93902,7 +93902,7 @@ + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93915,7 +93915,7 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93938,7 +93938,7 @@ + (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93951,7 +93951,7 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -93974,7 +93974,7 @@ + (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -93987,7 +93987,7 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94010,7 +94010,7 @@ + (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94023,7 +94023,7 @@ - (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94046,7 +94046,7 @@ + (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94059,7 +94059,7 @@ - (void)subscribeAttributeAvailableAudioTracksWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94082,7 +94082,7 @@ + (void)readAttributeAvailableAudioTracksWithClusterStateCache:(MTRClusterStateC - (void)readAttributeActiveTextTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94095,7 +94095,7 @@ - (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94118,7 +94118,7 @@ + (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94131,7 +94131,7 @@ - (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94154,7 +94154,7 @@ + (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94167,7 +94167,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94190,7 +94190,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94203,7 +94203,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94226,7 +94226,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94239,7 +94239,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94262,7 +94262,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94275,7 +94275,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94298,7 +94298,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94311,7 +94311,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94334,7 +94334,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -94347,7 +94347,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -94937,7 +94937,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::SelectInput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -94965,7 +94965,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::ShowInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -94993,7 +94993,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::HideInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -95017,7 +95017,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::RenameInput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -95031,7 +95031,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95044,7 +95044,7 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95067,7 +95067,7 @@ + (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95080,7 +95080,7 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95103,7 +95103,7 @@ + (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95116,7 +95116,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95139,7 +95139,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95152,7 +95152,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95175,7 +95175,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95188,7 +95188,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95211,7 +95211,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95224,7 +95224,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95247,7 +95247,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95260,7 +95260,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95283,7 +95283,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95296,7 +95296,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95623,7 +95623,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LowPower::Commands::Sleep::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -95637,7 +95637,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95650,7 +95650,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95673,7 +95673,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95686,7 +95686,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95709,7 +95709,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95722,7 +95722,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95745,7 +95745,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95758,7 +95758,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95781,7 +95781,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95794,7 +95794,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -95817,7 +95817,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -95830,7 +95830,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96064,7 +96064,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = KeypadInput::Commands::SendKey::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -96078,7 +96078,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completio - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96091,7 +96091,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96114,7 +96114,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96127,7 +96127,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96150,7 +96150,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96163,7 +96163,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96186,7 +96186,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96199,7 +96199,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96222,7 +96222,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96235,7 +96235,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96258,7 +96258,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96271,7 +96271,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96504,7 +96504,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentLauncher::Commands::LaunchContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -96528,7 +96528,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentLauncher::Commands::LaunchURL::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -96542,7 +96542,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params c - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96555,7 +96555,7 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96578,7 +96578,7 @@ + (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96609,7 +96609,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -96619,7 +96619,7 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96642,7 +96642,7 @@ + (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRCluste - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96655,7 +96655,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96678,7 +96678,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96691,7 +96691,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96714,7 +96714,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96727,7 +96727,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96750,7 +96750,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96763,7 +96763,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96786,7 +96786,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96799,7 +96799,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -96822,7 +96822,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -96835,7 +96835,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97154,7 +97154,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = AudioOutput::Commands::SelectOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -97178,7 +97178,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = AudioOutput::Commands::RenameOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -97192,7 +97192,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97205,7 +97205,7 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97228,7 +97228,7 @@ + (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97241,7 +97241,7 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97264,7 +97264,7 @@ + (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97277,7 +97277,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97300,7 +97300,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97313,7 +97313,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97336,7 +97336,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97349,7 +97349,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97372,7 +97372,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97385,7 +97385,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97408,7 +97408,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97421,7 +97421,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97444,7 +97444,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97457,7 +97457,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97766,7 +97766,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -97794,7 +97794,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::StopApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -97822,7 +97822,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::HideApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -97836,7 +97836,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97849,7 +97849,7 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97872,7 +97872,7 @@ + (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97913,7 +97913,7 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -97923,7 +97923,7 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97946,7 +97946,7 @@ + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97959,7 +97959,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -97982,7 +97982,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -97995,7 +97995,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98018,7 +98018,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98031,7 +98031,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98054,7 +98054,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98067,7 +98067,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98090,7 +98090,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98103,7 +98103,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98126,7 +98126,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98139,7 +98139,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98455,7 +98455,7 @@ @implementation MTRBaseClusterApplicationBasic - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98468,7 +98468,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98491,7 +98491,7 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98504,7 +98504,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98527,7 +98527,7 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98540,7 +98540,7 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98563,7 +98563,7 @@ + (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98576,7 +98576,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98599,7 +98599,7 @@ + (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98612,7 +98612,7 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98635,7 +98635,7 @@ + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98648,7 +98648,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98671,7 +98671,7 @@ + (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98684,7 +98684,7 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98707,7 +98707,7 @@ + (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98720,7 +98720,7 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98743,7 +98743,7 @@ + (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98756,7 +98756,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98779,7 +98779,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98792,7 +98792,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98815,7 +98815,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98828,7 +98828,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98851,7 +98851,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98864,7 +98864,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98887,7 +98887,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98900,7 +98900,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -98923,7 +98923,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -98936,7 +98936,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99443,7 +99443,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params } using RequestType = AccountLogin::Commands::GetSetupPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -99470,7 +99470,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( } using RequestType = AccountLogin::Commands::Login::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -99501,7 +99501,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params } using RequestType = AccountLogin::Commands::Logout::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -99515,7 +99515,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99528,7 +99528,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99551,7 +99551,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99564,7 +99564,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99587,7 +99587,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99600,7 +99600,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99623,7 +99623,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99636,7 +99636,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99659,7 +99659,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99672,7 +99672,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99695,7 +99695,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -99708,7 +99708,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -99955,7 +99955,7 @@ - (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params co auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::UpdatePIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -99983,7 +99983,7 @@ - (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::ResetPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100011,7 +100011,7 @@ - (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::Enable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100039,7 +100039,7 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100067,7 +100067,7 @@ - (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::AddBonusTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100091,7 +100091,7 @@ - (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTime auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100119,7 +100119,7 @@ - (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedConte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::BlockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100147,7 +100147,7 @@ - (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedC auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100171,7 +100171,7 @@ - (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDeman auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100195,7 +100195,7 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100209,7 +100209,7 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe - (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100222,7 +100222,7 @@ - (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100245,7 +100245,7 @@ + (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100258,7 +100258,7 @@ - (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100281,7 +100281,7 @@ + (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100294,7 +100294,7 @@ - (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100317,7 +100317,7 @@ + (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterSta - (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100330,7 +100330,7 @@ - (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100353,7 +100353,7 @@ + (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterSta - (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100366,7 +100366,7 @@ - (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscrib reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100389,7 +100389,7 @@ + (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRCl - (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100402,7 +100402,7 @@ - (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100425,7 +100425,7 @@ + (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100438,7 +100438,7 @@ - (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100461,7 +100461,7 @@ + (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100474,7 +100474,7 @@ - (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100497,7 +100497,7 @@ + (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100510,7 +100510,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100533,7 +100533,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100546,7 +100546,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100569,7 +100569,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100582,7 +100582,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100605,7 +100605,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100618,7 +100618,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100641,7 +100641,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100654,7 +100654,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100677,7 +100677,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100690,7 +100690,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100728,7 +100728,7 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -100742,7 +100742,7 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100755,7 +100755,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100778,7 +100778,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100791,7 +100791,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100814,7 +100814,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100827,7 +100827,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100850,7 +100850,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100863,7 +100863,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100886,7 +100886,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100899,7 +100899,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100922,7 +100922,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -100935,7 +100935,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -100977,7 +100977,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -101001,7 +101001,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -101015,7 +101015,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101028,7 +101028,7 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101051,7 +101051,7 @@ + (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101064,7 +101064,7 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101087,7 +101087,7 @@ + (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101100,7 +101100,7 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101123,7 +101123,7 @@ + (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101136,7 +101136,7 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101159,7 +101159,7 @@ + (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101172,7 +101172,7 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101195,7 +101195,7 @@ + (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101208,7 +101208,7 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101231,7 +101231,7 @@ + (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101244,7 +101244,7 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101267,7 +101267,7 @@ + (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101280,7 +101280,7 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101303,7 +101303,7 @@ + (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101316,7 +101316,7 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101339,7 +101339,7 @@ + (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101352,7 +101352,7 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101375,7 +101375,7 @@ + (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101388,7 +101388,7 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101411,7 +101411,7 @@ + (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101424,7 +101424,7 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101447,7 +101447,7 @@ + (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101460,7 +101460,7 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101483,7 +101483,7 @@ + (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101496,7 +101496,7 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101519,7 +101519,7 @@ + (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101532,7 +101532,7 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101555,7 +101555,7 @@ + (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101568,7 +101568,7 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101591,7 +101591,7 @@ + (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101604,7 +101604,7 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101627,7 +101627,7 @@ + (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101640,7 +101640,7 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101663,7 +101663,7 @@ + (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101676,7 +101676,7 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101699,7 +101699,7 @@ + (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101712,7 +101712,7 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101735,7 +101735,7 @@ + (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101748,7 +101748,7 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101771,7 +101771,7 @@ + (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101784,7 +101784,7 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101807,7 +101807,7 @@ + (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101820,7 +101820,7 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101843,7 +101843,7 @@ + (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101856,7 +101856,7 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101879,7 +101879,7 @@ + (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101892,7 +101892,7 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101915,7 +101915,7 @@ + (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101928,7 +101928,7 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101951,7 +101951,7 @@ + (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -101964,7 +101964,7 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -101987,7 +101987,7 @@ + (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102000,7 +102000,7 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102023,7 +102023,7 @@ + (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102036,7 +102036,7 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102059,7 +102059,7 @@ + (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRCluste - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102072,7 +102072,7 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102095,7 +102095,7 @@ + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRCl - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102108,7 +102108,7 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102131,7 +102131,7 @@ + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRCl - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102144,7 +102144,7 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102167,7 +102167,7 @@ + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRCl - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102180,7 +102180,7 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102203,7 +102203,7 @@ + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRCl - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102216,7 +102216,7 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102239,7 +102239,7 @@ + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRCl - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102252,7 +102252,7 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102275,7 +102275,7 @@ + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRC - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102288,7 +102288,7 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102311,7 +102311,7 @@ + (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterState - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102324,7 +102324,7 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102347,7 +102347,7 @@ + (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCac - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102360,7 +102360,7 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102383,7 +102383,7 @@ + (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102396,7 +102396,7 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102419,7 +102419,7 @@ + (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102432,7 +102432,7 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102455,7 +102455,7 @@ + (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterS - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102468,7 +102468,7 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102491,7 +102491,7 @@ + (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClu - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102504,7 +102504,7 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102527,7 +102527,7 @@ + (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateC - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102540,7 +102540,7 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102563,7 +102563,7 @@ + (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterSt - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102576,7 +102576,7 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102599,7 +102599,7 @@ + (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRCluster - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102612,7 +102612,7 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102635,7 +102635,7 @@ + (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClust - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102648,7 +102648,7 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102671,7 +102671,7 @@ + (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102684,7 +102684,7 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102707,7 +102707,7 @@ + (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102720,7 +102720,7 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102743,7 +102743,7 @@ + (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102756,7 +102756,7 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102779,7 +102779,7 @@ + (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102792,7 +102792,7 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102815,7 +102815,7 @@ + (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102828,7 +102828,7 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102851,7 +102851,7 @@ + (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102864,7 +102864,7 @@ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102887,7 +102887,7 @@ + (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102900,7 +102900,7 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102923,7 +102923,7 @@ + (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102936,7 +102936,7 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102959,7 +102959,7 @@ + (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -102972,7 +102972,7 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -102995,7 +102995,7 @@ + (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103008,7 +103008,7 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103031,7 +103031,7 @@ + (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103044,7 +103044,7 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103067,7 +103067,7 @@ + (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103080,7 +103080,7 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103103,7 +103103,7 @@ + (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103134,7 +103134,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103144,7 +103144,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103167,7 +103167,7 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MT - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103198,7 +103198,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103208,7 +103208,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103231,7 +103231,7 @@ + (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClus - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103262,7 +103262,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103272,7 +103272,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103295,7 +103295,7 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRCluste - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103326,7 +103326,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103336,7 +103336,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103359,7 +103359,7 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClust - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103390,7 +103390,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103400,7 +103400,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103423,7 +103423,7 @@ + (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103454,7 +103454,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103464,7 +103464,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103487,7 +103487,7 @@ + (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterState - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103500,7 +103500,7 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103523,7 +103523,7 @@ + (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103536,7 +103536,7 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103559,7 +103559,7 @@ + (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103572,7 +103572,7 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103595,7 +103595,7 @@ + (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103608,7 +103608,7 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103631,7 +103631,7 @@ + (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103644,7 +103644,7 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103667,7 +103667,7 @@ + (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103680,7 +103680,7 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103703,7 +103703,7 @@ + (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103734,7 +103734,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value par TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103744,7 +103744,7 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103767,7 +103767,7 @@ + (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103780,7 +103780,7 @@ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103803,7 +103803,7 @@ + (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103816,7 +103816,7 @@ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103839,7 +103839,7 @@ + (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103870,7 +103870,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -103880,7 +103880,7 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103903,7 +103903,7 @@ + (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103916,7 +103916,7 @@ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103939,7 +103939,7 @@ + (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103952,7 +103952,7 @@ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -103975,7 +103975,7 @@ + (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -103988,7 +103988,7 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104011,7 +104011,7 @@ + (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterState - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104024,7 +104024,7 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104047,7 +104047,7 @@ + (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterSta - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104060,7 +104060,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104083,7 +104083,7 @@ + (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterState - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104096,7 +104096,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104119,7 +104119,7 @@ + (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStat - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104132,7 +104132,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104155,7 +104155,7 @@ + (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterState - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104168,7 +104168,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104191,7 +104191,7 @@ + (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStat - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104204,7 +104204,7 @@ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104227,7 +104227,7 @@ + (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104240,7 +104240,7 @@ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104263,7 +104263,7 @@ + (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104276,7 +104276,7 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104299,7 +104299,7 @@ + (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104312,7 +104312,7 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104335,7 +104335,7 @@ + (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104348,7 +104348,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104371,7 +104371,7 @@ + (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterState - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104384,7 +104384,7 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104407,7 +104407,7 @@ + (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104420,7 +104420,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104443,7 +104443,7 @@ + (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104456,7 +104456,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104479,7 +104479,7 @@ + (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104492,7 +104492,7 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104515,7 +104515,7 @@ + (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104528,7 +104528,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104551,7 +104551,7 @@ + (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104564,7 +104564,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104587,7 +104587,7 @@ + (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104600,7 +104600,7 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104623,7 +104623,7 @@ + (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104636,7 +104636,7 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104659,7 +104659,7 @@ + (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateC - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104672,7 +104672,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104695,7 +104695,7 @@ + (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateC - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104708,7 +104708,7 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104731,7 +104731,7 @@ + (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104744,7 +104744,7 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104767,7 +104767,7 @@ + (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCa - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104780,7 +104780,7 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104803,7 +104803,7 @@ + (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104816,7 +104816,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104839,7 +104839,7 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCac - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104852,7 +104852,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104875,7 +104875,7 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MT - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104888,7 +104888,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104911,7 +104911,7 @@ + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(M - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104924,7 +104924,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104947,7 +104947,7 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTR - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104960,7 +104960,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -104983,7 +104983,7 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MT - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -104996,7 +104996,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105019,7 +105019,7 @@ + (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterS - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105032,7 +105032,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105055,7 +105055,7 @@ + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRCluste - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105068,7 +105068,7 @@ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105091,7 +105091,7 @@ + (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105104,7 +105104,7 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105127,7 +105127,7 @@ + (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105140,7 +105140,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105163,7 +105163,7 @@ + (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterState - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105176,7 +105176,7 @@ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105199,7 +105199,7 @@ + (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105212,7 +105212,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105235,7 +105235,7 @@ + (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105248,7 +105248,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105271,7 +105271,7 @@ + (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105284,7 +105284,7 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105307,7 +105307,7 @@ + (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105320,7 +105320,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105343,7 +105343,7 @@ + (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105356,7 +105356,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105379,7 +105379,7 @@ + (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105392,7 +105392,7 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105415,7 +105415,7 @@ + (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105428,7 +105428,7 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105451,7 +105451,7 @@ + (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateC - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105464,7 +105464,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105487,7 +105487,7 @@ + (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateC - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105500,7 +105500,7 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105523,7 +105523,7 @@ + (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105536,7 +105536,7 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105559,7 +105559,7 @@ + (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCa - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105572,7 +105572,7 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105595,7 +105595,7 @@ + (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105608,7 +105608,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105631,7 +105631,7 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCac - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105644,7 +105644,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105667,7 +105667,7 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MT - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105680,7 +105680,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105703,7 +105703,7 @@ + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(M - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105716,7 +105716,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105739,7 +105739,7 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTR - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105752,7 +105752,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105775,7 +105775,7 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MT - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105788,7 +105788,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105811,7 +105811,7 @@ + (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterS - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105824,7 +105824,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105847,7 +105847,7 @@ + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRCluste - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105860,7 +105860,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105883,7 +105883,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105896,7 +105896,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105919,7 +105919,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105932,7 +105932,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105955,7 +105955,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -105968,7 +105968,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -105991,7 +105991,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -106004,7 +106004,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -106027,7 +106027,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -106040,7 +106040,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -110827,7 +110827,7 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params compl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::Test::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110855,7 +110855,7 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNotHandled::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110883,7 +110883,7 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSpecific::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110911,7 +110911,7 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestUnknownCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110935,7 +110935,7 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestAddArguments::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110959,7 +110959,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSimpleArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -110983,7 +110983,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestStructArrayArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111007,7 +111007,7 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111031,7 +111031,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNestedStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111055,7 +111055,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111079,7 +111079,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListInt8UArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111103,7 +111103,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNestedStructListArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111127,7 +111127,7 @@ - (void)testListNestedStructListArgumentRequestWithParams:(MTRUnitTestingCluster auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111151,7 +111151,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListInt8UReverseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111175,7 +111175,7 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEnumsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111203,7 +111203,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNullableOptionalRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111227,7 +111227,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestComplexNullableOptionalRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111251,7 +111251,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::SimpleStructEchoRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111282,7 +111282,7 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar } using RequestType = UnitTesting::Commands::TimedInvokeRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111310,7 +111310,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111334,7 +111334,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEmitTestEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111358,7 +111358,7 @@ - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTes auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111382,7 +111382,7 @@ - (void)testBatchHelperRequestWithParams:(MTRUnitTestingClusterTestBatchHelperRe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestBatchHelperRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111406,7 +111406,7 @@ - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondB auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSecondBatchHelperRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -111444,7 +111444,7 @@ - (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDiffer - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111475,7 +111475,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111485,7 +111485,7 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111508,7 +111508,7 @@ + (void)readAttributeBooleanWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111539,7 +111539,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111549,7 +111549,7 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111572,7 +111572,7 @@ + (void)readAttributeBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111603,7 +111603,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111613,7 +111613,7 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111636,7 +111636,7 @@ + (void)readAttributeBitmap16WithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111667,7 +111667,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111677,7 +111677,7 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111700,7 +111700,7 @@ + (void)readAttributeBitmap32WithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111731,7 +111731,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedLongLongValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111741,7 +111741,7 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111764,7 +111764,7 @@ + (void)readAttributeBitmap64WithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111795,7 +111795,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWrite TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111805,7 +111805,7 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111828,7 +111828,7 @@ + (void)readAttributeInt8uWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111859,7 +111859,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111869,7 +111869,7 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111892,7 +111892,7 @@ + (void)readAttributeInt16uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111923,7 +111923,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111933,7 +111933,7 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -111956,7 +111956,7 @@ + (void)readAttributeInt24uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -111987,7 +111987,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -111997,7 +111997,7 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112020,7 +112020,7 @@ + (void)readAttributeInt32uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112051,7 +112051,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112061,7 +112061,7 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112084,7 +112084,7 @@ + (void)readAttributeInt40uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112115,7 +112115,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112125,7 +112125,7 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112148,7 +112148,7 @@ + (void)readAttributeInt48uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112179,7 +112179,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112189,7 +112189,7 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112212,7 +112212,7 @@ + (void)readAttributeInt56uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112243,7 +112243,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112253,7 +112253,7 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112276,7 +112276,7 @@ + (void)readAttributeInt64uWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112307,7 +112307,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWrite TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112317,7 +112317,7 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112340,7 +112340,7 @@ + (void)readAttributeInt8sWithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112371,7 +112371,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112381,7 +112381,7 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112404,7 +112404,7 @@ + (void)readAttributeInt16sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112435,7 +112435,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112445,7 +112445,7 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112468,7 +112468,7 @@ + (void)readAttributeInt24sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112499,7 +112499,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112509,7 +112509,7 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112532,7 +112532,7 @@ + (void)readAttributeInt32sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112563,7 +112563,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112573,7 +112573,7 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112596,7 +112596,7 @@ + (void)readAttributeInt40sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112627,7 +112627,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112637,7 +112637,7 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112660,7 +112660,7 @@ + (void)readAttributeInt48sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112691,7 +112691,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112701,7 +112701,7 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112724,7 +112724,7 @@ + (void)readAttributeInt56sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112755,7 +112755,7 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112765,7 +112765,7 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112788,7 +112788,7 @@ + (void)readAttributeInt64sWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112819,7 +112819,7 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWrite TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112829,7 +112829,7 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112852,7 +112852,7 @@ + (void)readAttributeEnum8WithClusterStateCache:(MTRClusterStateCacheContainer * - (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112883,7 +112883,7 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112893,7 +112893,7 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112916,7 +112916,7 @@ + (void)readAttributeEnum16WithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -112947,7 +112947,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.floatValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -112957,7 +112957,7 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -112980,7 +112980,7 @@ + (void)readAttributeFloatSingleWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113011,7 +113011,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113021,7 +113021,7 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113044,7 +113044,7 @@ + (void)readAttributeFloatDoubleWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113075,7 +113075,7 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRW TypeInfo::Type cppValue; cppValue = AsByteSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113085,7 +113085,7 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113108,7 +113108,7 @@ + (void)readAttributeOctetStringWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113160,7 +113160,7 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWr } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113170,7 +113170,7 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113193,7 +113193,7 @@ + (void)readAttributeListInt8uWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113245,7 +113245,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params: } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113255,7 +113255,7 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113278,7 +113278,7 @@ + (void)readAttributeListOctetStringWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113331,7 +113331,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value p } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113341,7 +113341,7 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113364,7 +113364,7 @@ + (void)readAttributeListStructOctetStringWithClusterStateCache:(MTRClusterState - (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113395,7 +113395,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:( TypeInfo::Type cppValue; cppValue = AsByteSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113405,7 +113405,7 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113428,7 +113428,7 @@ + (void)readAttributeLongOctetStringWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113459,7 +113459,7 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTR TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113469,7 +113469,7 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113492,7 +113492,7 @@ + (void)readAttributeCharStringWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113523,7 +113523,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params: TypeInfo::Type cppValue; cppValue = AsCharSpan(value); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113533,7 +113533,7 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113556,7 +113556,7 @@ + (void)readAttributeLongCharStringWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113587,7 +113587,7 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWri TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113597,7 +113597,7 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113620,7 +113620,7 @@ + (void)readAttributeEpochUsWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113651,7 +113651,7 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWrit TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113661,7 +113661,7 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113684,7 +113684,7 @@ + (void)readAttributeEpochSWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113715,7 +113715,7 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113725,7 +113725,7 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113748,7 +113748,7 @@ + (void)readAttributeVendorIdWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -113959,7 +113959,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -113969,7 +113969,7 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -113992,7 +113992,7 @@ + (void)readAttributeListNullablesAndOptionalsStructWithClusterStateCache:(MTRCl - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114023,7 +114023,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114033,7 +114033,7 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114056,7 +114056,7 @@ + (void)readAttributeEnumAttrWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114094,7 +114094,7 @@ - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _ cppValue.g = value.g.floatValue; cppValue.h = value.h.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114104,7 +114104,7 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114127,7 +114127,7 @@ + (void)readAttributeStructAttrWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114158,7 +114158,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114168,7 +114168,7 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114191,7 +114191,7 @@ + (void)readAttributeRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateC - (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114222,7 +114222,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value p TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114232,7 +114232,7 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114255,7 +114255,7 @@ + (void)readAttributeRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateC - (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114286,7 +114286,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114296,7 +114296,7 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114319,7 +114319,7 @@ + (void)readAttributeRangeRestrictedInt16uWithClusterStateCache:(MTRClusterState - (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114350,7 +114350,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114360,7 +114360,7 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114383,7 +114383,7 @@ + (void)readAttributeRangeRestrictedInt16sWithClusterStateCache:(MTRClusterState - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114435,7 +114435,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value par } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114445,7 +114445,7 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114468,7 +114468,7 @@ + (void)readAttributeListLongOctetStringWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114571,7 +114571,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114581,7 +114581,7 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114604,7 +114604,7 @@ + (void)readAttributeListFabricScopedWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114638,7 +114638,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value para TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114648,7 +114648,7 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114671,7 +114671,7 @@ + (void)readAttributeTimedWriteBooleanWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114702,7 +114702,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114712,7 +114712,7 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114735,7 +114735,7 @@ + (void)readAttributeGeneralErrorBooleanWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114766,7 +114766,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value pa TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114776,7 +114776,7 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114799,7 +114799,7 @@ + (void)readAttributeClusterErrorBooleanWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114830,7 +114830,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MT TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114840,7 +114840,7 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114863,7 +114863,7 @@ + (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114899,7 +114899,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value param nonNullValue_0 = value.boolValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114909,7 +114909,7 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -114932,7 +114932,7 @@ + (void)readAttributeNullableBooleanWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -114968,7 +114968,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value param nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -114978,7 +114978,7 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115001,7 +115001,7 @@ + (void)readAttributeNullableBitmap8WithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115037,7 +115037,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value para nonNullValue_0 = static_cast>(value.unsignedShortValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115047,7 +115047,7 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115070,7 +115070,7 @@ + (void)readAttributeNullableBitmap16WithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115106,7 +115106,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value para nonNullValue_0 = static_cast>(value.unsignedIntValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115116,7 +115116,7 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115139,7 +115139,7 @@ + (void)readAttributeNullableBitmap32WithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115175,7 +115175,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value para nonNullValue_0 = static_cast>(value.unsignedLongLongValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115185,7 +115185,7 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115208,7 +115208,7 @@ + (void)readAttributeNullableBitmap64WithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115244,7 +115244,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params: nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115254,7 +115254,7 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115277,7 +115277,7 @@ + (void)readAttributeNullableInt8uWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115313,7 +115313,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115323,7 +115323,7 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115346,7 +115346,7 @@ + (void)readAttributeNullableInt16uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115382,7 +115382,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115392,7 +115392,7 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115415,7 +115415,7 @@ + (void)readAttributeNullableInt24uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115451,7 +115451,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115461,7 +115461,7 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115484,7 +115484,7 @@ + (void)readAttributeNullableInt32uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115520,7 +115520,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115530,7 +115530,7 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115553,7 +115553,7 @@ + (void)readAttributeNullableInt40uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115589,7 +115589,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115599,7 +115599,7 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115622,7 +115622,7 @@ + (void)readAttributeNullableInt48uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115658,7 +115658,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115668,7 +115668,7 @@ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115691,7 +115691,7 @@ + (void)readAttributeNullableInt56uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115727,7 +115727,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115737,7 +115737,7 @@ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115760,7 +115760,7 @@ + (void)readAttributeNullableInt64uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115796,7 +115796,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params: nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115806,7 +115806,7 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115829,7 +115829,7 @@ + (void)readAttributeNullableInt8sWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115865,7 +115865,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115875,7 +115875,7 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115898,7 +115898,7 @@ + (void)readAttributeNullableInt16sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -115934,7 +115934,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -115944,7 +115944,7 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -115967,7 +115967,7 @@ + (void)readAttributeNullableInt24sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116003,7 +116003,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116013,7 +116013,7 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116036,7 +116036,7 @@ + (void)readAttributeNullableInt32sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116072,7 +116072,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116082,7 +116082,7 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116105,7 +116105,7 @@ + (void)readAttributeNullableInt40sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116141,7 +116141,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116151,7 +116151,7 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116174,7 +116174,7 @@ + (void)readAttributeNullableInt48sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116210,7 +116210,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116220,7 +116220,7 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116243,7 +116243,7 @@ + (void)readAttributeNullableInt56sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116279,7 +116279,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116289,7 +116289,7 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116312,7 +116312,7 @@ + (void)readAttributeNullableInt64sWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116348,7 +116348,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params: nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116358,7 +116358,7 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116381,7 +116381,7 @@ + (void)readAttributeNullableEnum8WithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116417,7 +116417,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116427,7 +116427,7 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116450,7 +116450,7 @@ + (void)readAttributeNullableEnum16WithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116486,7 +116486,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value p nonNullValue_0 = value.floatValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116496,7 +116496,7 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116519,7 +116519,7 @@ + (void)readAttributeNullableFloatSingleWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116555,7 +116555,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value p nonNullValue_0 = value.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116565,7 +116565,7 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116588,7 +116588,7 @@ + (void)readAttributeNullableFloatDoubleWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116624,7 +116624,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value par nonNullValue_0 = AsByteSpan(value); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116634,7 +116634,7 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116657,7 +116657,7 @@ + (void)readAttributeNullableOctetStringWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116693,7 +116693,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value pa nonNullValue_0 = AsCharSpan(value); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116703,7 +116703,7 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116726,7 +116726,7 @@ + (void)readAttributeNullableCharStringWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116762,7 +116762,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value para nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116772,7 +116772,7 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116795,7 +116795,7 @@ + (void)readAttributeNullableEnumAttrWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116838,7 +116838,7 @@ - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct nonNullValue_0.h = value.h.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116848,7 +116848,7 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116871,7 +116871,7 @@ + (void)readAttributeNullableStructWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116907,7 +116907,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116917,7 +116917,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -116940,7 +116940,7 @@ + (void)readAttributeNullableRangeRestrictedInt8uWithClusterStateCache:(MTRClust - (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -116976,7 +116976,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -116986,7 +116986,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117009,7 +117009,7 @@ + (void)readAttributeNullableRangeRestrictedInt8sWithClusterStateCache:(MTRClust - (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117045,7 +117045,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -117055,7 +117055,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117078,7 +117078,7 @@ + (void)readAttributeNullableRangeRestrictedInt16uWithClusterStateCache:(MTRClus - (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117114,7 +117114,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -117124,7 +117124,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117147,7 +117147,7 @@ + (void)readAttributeNullableRangeRestrictedInt16sWithClusterStateCache:(MTRClus - (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117178,7 +117178,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params: TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -117188,7 +117188,7 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117211,7 +117211,7 @@ + (void)readAttributeWriteOnlyInt8uWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117224,7 +117224,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117247,7 +117247,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117260,7 +117260,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117283,7 +117283,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117296,7 +117296,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117319,7 +117319,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117332,7 +117332,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117355,7 +117355,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117368,7 +117368,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -117391,7 +117391,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117404,7 +117404,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121415,7 +121415,7 @@ - (void)pingWithParams:(MTRSampleMEIClusterPingParams * _Nullable)params complet auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SampleMei::Commands::Ping::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -121439,7 +121439,7 @@ - (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params c auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SampleMei::Commands::AddArguments::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -121453,7 +121453,7 @@ - (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params c - (void)readAttributeFlipFlopWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::FlipFlop::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121484,7 +121484,7 @@ - (void)writeAttributeFlipFlopWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -121494,7 +121494,7 @@ - (void)subscribeAttributeFlipFlopWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::FlipFlop::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121517,7 +121517,7 @@ + (void)readAttributeFlipFlopWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121530,7 +121530,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121553,7 +121553,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121566,7 +121566,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121589,7 +121589,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121602,7 +121602,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121625,7 +121625,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121638,7 +121638,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121661,7 +121661,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121674,7 +121674,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params @@ -121697,7 +121697,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -121710,7 +121710,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = SampleMei::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 112012d598cd45..d2064b7991354b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -57,7 +57,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedVa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Identify::Commands::Identify::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -84,7 +84,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Identify::Commands::TriggerEffect::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -99,7 +99,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (NSDictionary * _Nullable)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) params:params]; } - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -110,42 +110,42 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeIdentifyTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) params:params]; } @end @@ -185,7 +185,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::AddGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -212,7 +212,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params expectedVa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::ViewGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -239,7 +239,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::GetGroupMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -266,7 +266,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params expect auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::RemoveGroup::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -297,7 +297,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::RemoveAllGroups::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -324,7 +324,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Groups::Commands::AddGroupIfIdentifying::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -339,37 +339,37 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) params:params]; } @end @@ -449,7 +449,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValue auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::Off::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -480,7 +480,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues: auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::On::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -511,7 +511,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expecte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::Toggle::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -538,7 +538,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OffWithEffect::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -569,7 +569,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OnWithRecallGlobalScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -596,7 +596,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OnOff::Commands::OnWithTimedOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -611,17 +611,17 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params e - (NSDictionary * _Nullable)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; } - (NSDictionary * _Nullable)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; } - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -632,12 +632,12 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; } - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -648,12 +648,12 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; } - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -664,37 +664,37 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; } @end @@ -758,12 +758,12 @@ @implementation MTRClusterOnOffSwitchConfiguration - (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; } - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -774,37 +774,37 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -834,7 +834,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToLevel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -861,7 +861,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Move::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -888,7 +888,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -915,7 +915,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -942,7 +942,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -969,7 +969,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -996,7 +996,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::StepWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1023,7 +1023,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::StopWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1050,7 +1050,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1065,42 +1065,42 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; } - (NSDictionary * _Nullable)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; } - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1111,12 +1111,12 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1127,12 +1127,12 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; } - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1143,12 +1143,12 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) params:params]; } - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1159,12 +1159,12 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) params:params]; } - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1175,12 +1175,12 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeDefaultMoveRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) params:params]; } - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1191,12 +1191,12 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeStartUpCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1207,37 +1207,37 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) params:params]; } @end @@ -1300,7 +1300,7 @@ @implementation MTRClusterBinaryInputBasic - (NSDictionary * _Nullable)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; } - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1311,12 +1311,12 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; } - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1327,12 +1327,12 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; } - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1343,12 +1343,12 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; } - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1359,17 +1359,17 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; } - (NSDictionary * _Nullable)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; } - (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1380,12 +1380,12 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; } - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1396,47 +1396,47 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; } - (NSDictionary * _Nullable)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; } @end @@ -1454,32 +1454,32 @@ @implementation MTRClusterPulseWidthModulation - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) params:params]; } @end @@ -1488,57 +1488,57 @@ @implementation MTRClusterDescriptor - (NSDictionary * _Nullable)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) params:params]; } - (NSDictionary * _Nullable)readAttributeClientListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) params:params]; } - (NSDictionary * _Nullable)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) params:params]; } - (NSDictionary * _Nullable)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeTagListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeTagListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) params:params]; } @end @@ -1560,7 +1560,7 @@ @implementation MTRClusterBinding - (NSDictionary * _Nullable)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) params:params]; } - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1571,37 +1571,37 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) params:params]; } @end @@ -1619,7 +1619,7 @@ @implementation MTRClusterAccessControl - (NSDictionary * _Nullable)readAttributeACLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) params:params]; } - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1630,12 +1630,12 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) params:params]; } - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -1646,52 +1646,52 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSubjectsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) params:params]; } - (NSDictionary * _Nullable)readAttributeTargetsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; } - (NSDictionary * _Nullable)readAttributeAccessControlEntriesPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) params:params]; } @end @@ -1733,7 +1733,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::InstantAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1760,7 +1760,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::InstantActionWithTransition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1787,7 +1787,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params expec auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StartAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1814,7 +1814,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StartActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1841,7 +1841,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params expecte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::StopAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1868,7 +1868,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params expec auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::PauseAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1895,7 +1895,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::PauseActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1922,7 +1922,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::ResumeAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1949,7 +1949,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::EnableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -1976,7 +1976,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::EnableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2003,7 +2003,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::DisableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2030,7 +2030,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Actions::Commands::DisableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2045,47 +2045,47 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary * _Nullable)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEndpointListsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSetupURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) params:params]; } @end @@ -2179,7 +2179,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BasicInformation::Commands::MfgSpecificPing::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2194,32 +2194,32 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary * _Nullable)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeDataModelRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeDataModelRevisionID) params:params]; } - (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) params:params]; } - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2230,12 +2230,12 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLocationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) params:params]; } - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2246,57 +2246,57 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionStringID) params:params]; } - (NSDictionary * _Nullable)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionStringID) params:params]; } - (NSDictionary * _Nullable)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeManufacturingDateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeManufacturingDateID) params:params]; } - (NSDictionary * _Nullable)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributePartNumberID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributePartNumberID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductURLID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductURLID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductLabelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductLabelID) params:params]; } - (NSDictionary * _Nullable)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSerialNumberID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSerialNumberID) params:params]; } - (NSDictionary * _Nullable)readAttributeLocalConfigDisabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) params:params]; } - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2307,67 +2307,67 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeReachableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeReachableID) params:params]; } - (NSDictionary * _Nullable)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; } - (NSDictionary * _Nullable)readAttributeSpecificationVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxPathsPerInvokeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID) params:params]; } @end @@ -2408,7 +2408,7 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2435,7 +2435,7 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2462,7 +2462,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2477,32 +2477,32 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) params:params]; } @end @@ -2555,7 +2555,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -2570,7 +2570,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou - (NSDictionary * _Nullable)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; } - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2581,52 +2581,52 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUpdatePossibleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; } - (NSDictionary * _Nullable)readAttributeUpdateStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeUpdateStateProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; } @end @@ -2663,7 +2663,7 @@ @implementation MTRClusterLocalizationConfiguration - (NSDictionary * _Nullable)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; } - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2674,42 +2674,42 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSupportedLocalesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -2727,7 +2727,7 @@ @implementation MTRClusterTimeFormatLocalization - (NSDictionary * _Nullable)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; } - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2738,12 +2738,12 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeActiveCalendarTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; } - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2754,42 +2754,42 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSupportedCalendarTypesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; } @end @@ -2807,7 +2807,7 @@ @implementation MTRClusterUnitLocalization - (NSDictionary * _Nullable)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; } - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -2818,37 +2818,37 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) params:params]; } @end @@ -2866,37 +2866,37 @@ @implementation MTRClusterPowerSourceConfiguration - (NSDictionary * _Nullable)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -2914,192 +2914,192 @@ @implementation MTRClusterPowerSource - (NSDictionary * _Nullable)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeOrderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) params:params]; } - (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredAssessedInputVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredAssessedInputFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredCurrentTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredAssessedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredNominalVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredMaximumCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiredPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveWiredFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatPercentRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatChargeLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatReplacementNeededWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatReplaceabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveBatFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatReplacementDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatCommonDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatANSIDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatIECDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatApprovedChemistryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatChargeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatTimeToFullChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatFunctionalWhileChargingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatChargingCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) params:params]; } @end @@ -3129,7 +3129,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3156,7 +3156,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3187,7 +3187,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3202,7 +3202,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (NSDictionary * _Nullable)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; } - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -3213,57 +3213,57 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBasicCommissioningInfoWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) params:params]; } - (NSDictionary * _Nullable)readAttributeRegulatoryConfigWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; } - (NSDictionary * _Nullable)readAttributeLocationCapabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportsConcurrentConnectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; } @end @@ -3325,7 +3325,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3352,7 +3352,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3379,7 +3379,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3406,7 +3406,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3433,7 +3433,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3460,7 +3460,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3487,7 +3487,7 @@ - (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3502,27 +3502,27 @@ - (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityPara - (NSDictionary * _Nullable)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; } - (NSDictionary * _Nullable)readAttributeNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) params:params]; } - (NSDictionary * _Nullable)readAttributeScanMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; } - (NSDictionary * _Nullable)readAttributeConnectMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; } - (NSDictionary * _Nullable)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; } - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -3533,67 +3533,67 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLastNetworkingStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeLastNetworkIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeLastConnectErrorValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedWiFiBandsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeSupportedWiFiBandsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeSupportedWiFiBandsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedThreadFeaturesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeSupportedThreadFeaturesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeSupportedThreadFeaturesID) params:params]; } - (NSDictionary * _Nullable)readAttributeThreadVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeThreadVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeThreadVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; } @end @@ -3671,7 +3671,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3686,32 +3686,32 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; } @end @@ -3749,7 +3749,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3780,7 +3780,7 @@ - (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3795,77 +3795,77 @@ - (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * - (NSDictionary * _Nullable)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; } - (NSDictionary * _Nullable)readAttributeRebootCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeUpTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeTotalOperationalHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; } - (NSDictionary * _Nullable)readAttributeBootReasonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveHardwareFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveRadioFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveNetworkFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; } - (NSDictionary * _Nullable)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; } @end @@ -3908,7 +3908,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -3923,52 +3923,52 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary * _Nullable)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentHeapFreeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentHeapUsedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentHeapHighWatermarkWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; } @end @@ -4011,7 +4011,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4026,347 +4026,347 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary * _Nullable)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; } - (NSDictionary * _Nullable)readAttributeRoutingRoleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; } - (NSDictionary * _Nullable)readAttributeNetworkNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; } - (NSDictionary * _Nullable)readAttributePanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeExtendedPanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeshLocalPrefixWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; } - (NSDictionary * _Nullable)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeNeighborTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableID) params:params]; } - (NSDictionary * _Nullable)readAttributeRouteTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableID) params:params]; } - (NSDictionary * _Nullable)readAttributePartitionIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeWeightingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; } - (NSDictionary * _Nullable)readAttributeDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeStableDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeLeaderRouterIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeDetachedRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeChildRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRouterRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeLeaderRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePartitionIdChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeBetterPartitionAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeParentChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxAckedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxNoAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxRetryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxErrCcaCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxErrAbortCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxErrBusyChannelCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxAddressFilteredCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxDestAddrFilteredCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxDuplicatedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrNoFrameCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrUnknownNeighborCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrInvalidSrcAddrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrSecCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrFcsCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeRxErrOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; } - (NSDictionary * _Nullable)readAttributePendingTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; } - (NSDictionary * _Nullable)readAttributeDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; } - (NSDictionary * _Nullable)readAttributeSecurityPolicyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; } - (NSDictionary * _Nullable)readAttributeChannelPage0MaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalDatasetComponentsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveNetworkFaultsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @end @@ -4417,7 +4417,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4432,97 +4432,97 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary * _Nullable)readAttributeBSSIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBSSIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBSSIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeSecurityTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeWiFiVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeChannelNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; } - (NSDictionary * _Nullable)readAttributeRSSIWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRSSIID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRSSIID) params:params]; } - (NSDictionary * _Nullable)readAttributeBeaconLostCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeBeaconRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketMulticastRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketMulticastTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketUnicastRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketUnicastTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentMaxRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; } - (NSDictionary * _Nullable)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @end @@ -4573,7 +4573,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4588,77 +4588,77 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary * _Nullable)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; } - (NSDictionary * _Nullable)readAttributeFullDuplexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributePacketTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeTxErrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeCollisionCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary * _Nullable)readAttributeCarrierDetectWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeSinceResetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @end @@ -4697,7 +4697,7 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetUTCTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4724,7 +4724,7 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4751,7 +4751,7 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetTimeZone::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4778,7 +4778,7 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetDSTOffset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4805,7 +4805,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TimeSynchronization::Commands::SetDefaultNTP::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -4820,97 +4820,97 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary * _Nullable)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) params:params]; } - (NSDictionary * _Nullable)readAttributeTrustedTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultNTPWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) params:params]; } - (NSDictionary * _Nullable)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) params:params]; } - (NSDictionary * _Nullable)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeNTPServerAvailableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeZoneListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneListMaxSizeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneListMaxSizeID) params:params]; } - (NSDictionary * _Nullable)readAttributeDSTOffsetListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetListMaxSizeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetListMaxSizeID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportsDNSResolveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) params:params]; } @end @@ -4919,22 +4919,22 @@ @implementation MTRClusterBridgedDeviceBasicInformation - (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) params:params]; } - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -4945,97 +4945,97 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionStringID) params:params]; } - (NSDictionary * _Nullable)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; } - (NSDictionary * _Nullable)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; } - (NSDictionary * _Nullable)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; } - (NSDictionary * _Nullable)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; } - (NSDictionary * _Nullable)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; } - (NSDictionary * _Nullable)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; } @end @@ -5055,47 +5055,47 @@ @implementation MTRClusterSwitch - (NSDictionary * _Nullable)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; } - (NSDictionary * _Nullable)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; } @end @@ -5128,7 +5128,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO } using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5158,7 +5158,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu } using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5192,7 +5192,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok } using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5207,47 +5207,47 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary * _Nullable)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; } - (NSDictionary * _Nullable)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; } @end @@ -5296,7 +5296,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5323,7 +5323,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5350,7 +5350,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::CSRRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5377,7 +5377,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AddNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5404,7 +5404,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5431,7 +5431,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5458,7 +5458,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5485,7 +5485,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5500,62 +5500,62 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary * _Nullable)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; } - (NSDictionary * _Nullable)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; } - (NSDictionary * _Nullable)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; } - (NSDictionary * _Nullable)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; } @end @@ -5646,7 +5646,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5673,7 +5673,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5700,7 +5700,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5731,7 +5731,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -5746,7 +5746,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl - (NSDictionary * _Nullable)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; } - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -5757,52 +5757,52 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; } @end @@ -5846,37 +5846,37 @@ @implementation MTRClusterFixedLabel - (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; } @end @@ -5894,7 +5894,7 @@ @implementation MTRClusterUserLabel - (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; } - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -5905,37 +5905,37 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; } @end @@ -5953,37 +5953,37 @@ @implementation MTRClusterBooleanState - (NSDictionary * _Nullable)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; } @end @@ -6013,7 +6013,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::RegisterClient::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6040,7 +6040,7 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::UnregisterClient::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6071,7 +6071,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = IcdManagement::Commands::StayActiveRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6086,77 +6086,77 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; } - (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; } - (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; } - (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; } - (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID) params:params]; } - (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; } @end @@ -6177,7 +6177,7 @@ - (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValue auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::SetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6208,7 +6208,7 @@ - (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::ResetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6235,7 +6235,7 @@ - (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params expectedValues: auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::AddTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6262,7 +6262,7 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedV auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Timer::Commands::ReduceTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6277,47 +6277,47 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedV - (NSDictionary * _Nullable)readAttributeSetTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeSetTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeSetTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID) params:params]; } - (NSDictionary * _Nullable)readAttributeTimerStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimerStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimerStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID) params:params]; } @end @@ -6342,7 +6342,7 @@ - (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6373,7 +6373,7 @@ - (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullab auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6404,7 +6404,7 @@ - (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6435,7 +6435,7 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6450,62 +6450,62 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID) params:params]; } @end @@ -6526,7 +6526,7 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OvenMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6541,17 +6541,17 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params ex - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6562,12 +6562,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6578,37 +6578,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; } @end @@ -6617,12 +6617,12 @@ @implementation MTRClusterLaundryDryerControls - (NSDictionary * _Nullable)readAttributeSupportedDrynessLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSelectedDrynessLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) params:params]; } - (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6633,37 +6633,37 @@ - (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID) params:params]; } @end @@ -6684,7 +6684,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ModeSelect::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6699,27 +6699,27 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; } - (NSDictionary * _Nullable)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6730,12 +6730,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6746,37 +6746,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; } @end @@ -6811,7 +6811,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6826,17 +6826,17 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6847,12 +6847,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6863,37 +6863,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; } @end @@ -6914,7 +6914,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -6929,17 +6929,17 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6950,12 +6950,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6966,37 +6966,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; } @end @@ -7005,12 +7005,12 @@ @implementation MTRClusterLaundryWasherControls - (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; } - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7021,12 +7021,12 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; } - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7037,42 +7037,42 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; } @end @@ -7093,7 +7093,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcRunMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7108,17 +7108,17 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7129,37 +7129,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; } @end @@ -7180,7 +7180,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7195,17 +7195,17 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7216,37 +7216,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; } @end @@ -7271,7 +7271,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TemperatureControl::Commands::SetTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7286,62 +7286,62 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; } - (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; } - (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; } @end @@ -7350,47 +7350,47 @@ @implementation MTRClusterRefrigeratorAlarm - (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; } - (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; } @end @@ -7411,7 +7411,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7426,17 +7426,17 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7447,12 +7447,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7463,37 +7463,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; } @end @@ -7502,37 +7502,37 @@ @implementation MTRClusterAirQuality - (NSDictionary * _Nullable)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; } @end @@ -7557,7 +7557,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7572,62 +7572,62 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary * _Nullable)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; } - (NSDictionary * _Nullable)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; } - (NSDictionary * _Nullable)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; } - (NSDictionary * _Nullable)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; } - (NSDictionary * _Nullable)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; } - (NSDictionary * _Nullable)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; } - (NSDictionary * _Nullable)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; } - (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; } - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7638,42 +7638,42 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; } @end @@ -7694,7 +7694,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedV auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherAlarm::Commands::Reset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7721,7 +7721,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7736,52 +7736,52 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; } - (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; } - (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; } @end @@ -7790,42 +7790,42 @@ @implementation MTRClusterMicrowaveOvenMode - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; } @end @@ -7850,7 +7850,7 @@ - (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCooking auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7877,7 +7877,7 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -7892,77 +7892,77 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * - (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedWattsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID) params:params]; } - (NSDictionary * _Nullable)readAttributeSelectedWattIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID) params:params]; } - (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; } @end @@ -7987,7 +7987,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8018,7 +8018,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8049,7 +8049,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8080,7 +8080,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = OperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8095,62 +8095,62 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; } @end @@ -8175,7 +8175,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8206,7 +8206,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8237,7 +8237,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8268,7 +8268,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8299,7 +8299,7 @@ - (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = RvcOperationalState::Commands::GoHome::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8314,62 +8314,62 @@ - (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable) - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; } @end @@ -8390,7 +8390,7 @@ - (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::AddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8417,7 +8417,7 @@ - (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::ViewScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8444,7 +8444,7 @@ - (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RemoveScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8471,7 +8471,7 @@ - (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8498,7 +8498,7 @@ - (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::StoreScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8525,7 +8525,7 @@ - (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::RecallScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8552,7 +8552,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembersh auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8579,7 +8579,7 @@ - (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ScenesManagement::Commands::CopyScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8594,47 +8594,47 @@ - (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params - (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeLastConfiguredByID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeLastConfiguredByID) params:params]; } - (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneTableSizeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneTableSizeID) params:params]; } - (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFabricSceneInfoID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFabricSceneInfoID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeClusterRevisionID) params:params]; } @end @@ -8659,7 +8659,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8674,27 +8674,27 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; } - (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; } - (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; } - (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; } - (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; } - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -8705,42 +8705,42 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) params:params]; } @end @@ -8765,7 +8765,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8780,27 +8780,27 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) params:params]; } - (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) params:params]; } - (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) params:params]; } - (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) params:params]; } - (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) params:params]; } - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -8811,42 +8811,42 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) params:params]; } @end @@ -8867,7 +8867,7 @@ - (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8894,7 +8894,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableD auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -8909,7 +8909,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableD - (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) params:params]; } - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -8920,72 +8920,72 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -9010,7 +9010,7 @@ - (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ValveConfigurationAndControl::Commands::Open::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9041,7 +9041,7 @@ - (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ValveConfigurationAndControl::Commands::Close::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9056,12 +9056,12 @@ - (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nu - (NSDictionary * _Nullable)readAttributeOpenDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultOpenDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) params:params]; } - (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -9072,42 +9072,42 @@ - (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeAutoCloseTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeRemainingDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeTargetStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeTargetLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultOpenLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) params:params]; } - (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -9118,47 +9118,47 @@ - (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeValveFaultWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeLevelStepID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeLevelStepID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID) params:params]; } @end @@ -9167,57 +9167,57 @@ @implementation MTRClusterElectricalEnergyMeasurement - (NSDictionary * _Nullable)readAttributeAccuracyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAccuracyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAccuracyID) params:params]; } - (NSDictionary * _Nullable)readAttributeCumulativeEnergyImportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyImportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyImportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeCumulativeEnergyExportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyExportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyExportedID) params:params]; } - (NSDictionary * _Nullable)readAttributePeriodicEnergyImportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyImportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyImportedID) params:params]; } - (NSDictionary * _Nullable)readAttributePeriodicEnergyExportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyExportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyExportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -9238,7 +9238,7 @@ - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadContro auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9265,7 +9265,7 @@ - (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadCont auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9292,7 +9292,7 @@ - (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlCluste auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9319,7 +9319,7 @@ - (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9350,7 +9350,7 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9365,37 +9365,37 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu - (NSDictionary * _Nullable)readAttributeLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfEventsPerProgramWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultRandomStartWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) params:params]; } - (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -9406,12 +9406,12 @@ - (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeDefaultRandomDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID) params:params]; } - (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -9422,37 +9422,37 @@ - (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeClusterRevisionID) params:params]; } @end @@ -9473,7 +9473,7 @@ - (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjus auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9504,7 +9504,7 @@ - (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCanc auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9531,7 +9531,7 @@ - (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartT auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9558,7 +9558,7 @@ - (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9589,7 +9589,7 @@ - (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9616,7 +9616,7 @@ - (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyF auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9643,7 +9643,7 @@ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClust auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9674,7 +9674,7 @@ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9689,72 +9689,72 @@ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestPa - (NSDictionary * _Nullable)readAttributeESATypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESATypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESATypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeESACanGenerateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESACanGenerateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESACanGenerateID) params:params]; } - (NSDictionary * _Nullable)readAttributeESAStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESAStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESAStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMinPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMinPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMinPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMaxPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMaxPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMaxPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerAdjustmentCapabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributePowerAdjustmentCapabilityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributePowerAdjustmentCapabilityID) params:params]; } - (NSDictionary * _Nullable)readAttributeForecastWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID) params:params]; } - (NSDictionary * _Nullable)readAttributeOptOutStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeOptOutStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeOptOutStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeClusterRevisionID) params:params]; } @end @@ -9782,7 +9782,7 @@ - (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params } using RequestType = EnergyEvse::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9812,7 +9812,7 @@ - (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)par } using RequestType = EnergyEvse::Commands::EnableCharging::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9842,7 +9842,7 @@ - (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams } using RequestType = EnergyEvse::Commands::EnableDischarging::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9876,7 +9876,7 @@ - (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * } using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9906,7 +9906,7 @@ - (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expe } using RequestType = EnergyEvse::Commands::SetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9940,7 +9940,7 @@ - (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)p } using RequestType = EnergyEvse::Commands::GetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9974,7 +9974,7 @@ - (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullab } using RequestType = EnergyEvse::Commands::ClearTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -9989,52 +9989,52 @@ - (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullab - (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupplyStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSupplyStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSupplyStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeFaultStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFaultStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFaultStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeChargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeChargingEnabledUntilID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeChargingEnabledUntilID) params:params]; } - (NSDictionary * _Nullable)readAttributeDischargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeDischargingEnabledUntilID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeDischargingEnabledUntilID) params:params]; } - (NSDictionary * _Nullable)readAttributeCircuitCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeCircuitCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeCircuitCapacityID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinimumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMinimumChargeCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMinimumChargeCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumChargeCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumChargeCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaximumDischargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeUserMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID) params:params]; } - (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10045,12 +10045,12 @@ - (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary * _Nullable)readAttributeRandomizationDelayWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID) params:params]; } - (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10061,32 +10061,32 @@ - (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeNextChargeTargetTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeNextChargeRequiredEnergyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID) params:params]; } - (NSDictionary * _Nullable)readAttributeNextChargeTargetSoCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetSoCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetSoCID) params:params]; } - (NSDictionary * _Nullable)readAttributeApproximateEVEfficiencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeApproximateEVEfficiencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeApproximateEVEfficiencyID) params:params]; } - (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10097,72 +10097,72 @@ - (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary * _Nullable)readAttributeStateOfChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateOfChargeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateOfChargeID) params:params]; } - (NSDictionary * _Nullable)readAttributeBatteryCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeBatteryCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeBatteryCapacityID) params:params]; } - (NSDictionary * _Nullable)readAttributeVehicleIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeVehicleIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeVehicleIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeSessionIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeSessionDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeSessionEnergyChargedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyChargedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyChargedID) params:params]; } - (NSDictionary * _Nullable)readAttributeSessionEnergyDischargedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyDischargedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyDischargedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeClusterRevisionID) params:params]; } @end @@ -10171,12 +10171,12 @@ @implementation MTRClusterEnergyPreference - (NSDictionary * _Nullable)readAttributeEnergyBalancesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEnergyBalancesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEnergyBalancesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentEnergyBalanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeCurrentEnergyBalanceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeCurrentEnergyBalanceID) params:params]; } - (void)writeAttributeCurrentEnergyBalanceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10187,22 +10187,22 @@ - (void)writeAttributeCurrentEnergyBalanceWithValue:(NSDictionary * _Nullable)readAttributeEnergyPrioritiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEnergyPrioritiesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEnergyPrioritiesID) params:params]; } - (NSDictionary * _Nullable)readAttributeLowPowerModeSensitivitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeLowPowerModeSensitivitiesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeLowPowerModeSensitivitiesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentLowPowerModeSensitivityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeCurrentLowPowerModeSensitivityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeCurrentLowPowerModeSensitivityID) params:params]; } - (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10213,37 +10213,37 @@ - (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeClusterRevisionID) params:params]; } @end @@ -10264,7 +10264,7 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = EnergyEvseMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10279,17 +10279,17 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10300,12 +10300,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10316,37 +10316,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeClusterRevisionID) params:params]; } @end @@ -10367,7 +10367,7 @@ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToMode auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DeviceEnergyManagementMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10382,17 +10382,17 @@ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToMode - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10403,12 +10403,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -10419,37 +10419,37 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeClusterRevisionID) params:params]; } @end @@ -10477,7 +10477,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } using RequestType = DoorLock::Commands::LockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10511,7 +10511,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } using RequestType = DoorLock::Commands::UnlockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10541,7 +10541,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * } using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10568,7 +10568,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10595,7 +10595,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10622,7 +10622,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10649,7 +10649,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10676,7 +10676,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10703,7 +10703,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10730,7 +10730,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10757,7 +10757,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10784,7 +10784,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10814,7 +10814,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValu } using RequestType = DoorLock::Commands::SetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10841,7 +10841,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10871,7 +10871,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expected } using RequestType = DoorLock::Commands::ClearUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10901,7 +10901,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params } using RequestType = DoorLock::Commands::SetCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10928,7 +10928,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = DoorLock::Commands::GetCredentialStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10958,7 +10958,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par } using RequestType = DoorLock::Commands::ClearCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -10992,7 +10992,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par } using RequestType = DoorLock::Commands::UnboltDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11022,7 +11022,7 @@ - (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigPa } using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11056,7 +11056,7 @@ - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConf } using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11071,27 +11071,27 @@ - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConf - (NSDictionary * _Nullable)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; } - (NSDictionary * _Nullable)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; } - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11102,12 +11102,12 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; } - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11118,12 +11118,12 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; } - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11134,72 +11134,72 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; } - (NSDictionary * _Nullable)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; } - (NSDictionary * _Nullable)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; } - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11210,12 +11210,12 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; } - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11226,12 +11226,12 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; } - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11242,12 +11242,12 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; } - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11258,12 +11258,12 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) params:params]; } - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11274,22 +11274,22 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSupportedOperatingModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultConfigurationRegisterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; } - (NSDictionary * _Nullable)readAttributeEnableLocalProgrammingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11300,12 +11300,12 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary * _Nullable)readAttributeEnableOneTouchLockingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11316,12 +11316,12 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary * _Nullable)readAttributeEnableInsideStatusLEDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11332,12 +11332,12 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary * _Nullable)readAttributeEnablePrivacyModeButtonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11348,12 +11348,12 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary * _Nullable)readAttributeLocalProgrammingFeaturesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11364,12 +11364,12 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary * _Nullable)readAttributeWrongCodeEntryLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11380,12 +11380,12 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUserCodeTemporaryDisableTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11396,12 +11396,12 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary * _Nullable)readAttributeSendPINOverTheAirWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) params:params]; } - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11412,12 +11412,12 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeRequirePINforRemoteOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11428,12 +11428,12 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary * _Nullable)readAttributeExpiringUserTimeoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11444,82 +11444,82 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeAliroReaderVerificationKeyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderVerificationKeyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderVerificationKeyID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroReaderGroupIdentifierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupIdentifierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupIdentifierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroReaderGroupSubIdentifierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupSubIdentifierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupSubIdentifierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroExpeditedTransactionSupportedProtocolVersionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroExpeditedTransactionSupportedProtocolVersionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroGroupResolvingKeyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroGroupResolvingKeyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroGroupResolvingKeyID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroSupportedBLEUWBProtocolVersionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroSupportedBLEUWBProtocolVersionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeAliroBLEAdvertisingVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroBLEAdvertisingVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroBLEAdvertisingVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroCredentialIssuerKeysSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroCredentialIssuerKeysSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroEndpointKeysSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroEndpointKeysSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) params:params]; } @end @@ -11661,7 +11661,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::UpOrOpen::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11692,7 +11692,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::DownOrClose::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11723,7 +11723,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::StopMotion::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11750,7 +11750,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToLiftValue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11777,7 +11777,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToLiftPercentage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11804,7 +11804,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToTiltValue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11831,7 +11831,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = WindowCovering::Commands::GoToTiltPercentage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -11846,107 +11846,107 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary * _Nullable)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributePhysicalClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; } - (NSDictionary * _Nullable)readAttributePhysicalClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfActuationsLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfActuationsTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; } - (NSDictionary * _Nullable)readAttributeConfigStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionLiftPercentageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionTiltPercentageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeTargetPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) params:params]; } - (NSDictionary * _Nullable)readAttributeTargetPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) params:params]; } - (NSDictionary * _Nullable)readAttributeEndProductTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstalledOpenLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstalledClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstalledOpenLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstalledClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; } - (NSDictionary * _Nullable)readAttributeModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) params:params]; } - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -11957,42 +11957,42 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) params:params]; } @end @@ -12069,7 +12069,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12100,7 +12100,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = BarrierControl::Commands::BarrierControlStop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12115,22 +12115,22 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; } - (NSDictionary * _Nullable)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; } - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12141,12 +12141,12 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; } - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12157,12 +12157,12 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12173,12 +12173,12 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary * _Nullable)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12189,12 +12189,12 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary * _Nullable)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12205,12 +12205,12 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; } - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12221,42 +12221,42 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; } @end @@ -12288,97 +12288,97 @@ @implementation MTRClusterPumpConfigurationAndControl - (NSDictionary * _Nullable)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; } - (NSDictionary * _Nullable)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; } - (NSDictionary * _Nullable)readAttributeSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; } - (NSDictionary * _Nullable)readAttributeLifetimeRunningHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) params:params]; } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12389,17 +12389,17 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary * _Nullable)readAttributePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeLifetimeEnergyConsumedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) params:params]; } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12410,12 +12410,12 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary * _Nullable)readAttributeOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; } - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12426,12 +12426,12 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; } - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12442,37 +12442,37 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) params:params]; } @end @@ -12502,7 +12502,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetpointRaiseLower::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12529,7 +12529,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12556,7 +12556,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12587,7 +12587,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::ClearWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12614,7 +12614,7 @@ - (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveSchedul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetActiveScheduleRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12641,7 +12641,7 @@ - (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetReq auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12668,7 +12668,7 @@ - (void)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPre auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::StartPresetsSchedulesEditRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12699,7 +12699,7 @@ - (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CancelPresetsSchedulesEditRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12730,7 +12730,7 @@ - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPrese auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CommitPresetsSchedulesRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12761,7 +12761,7 @@ - (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetAct auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12788,7 +12788,7 @@ - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTempe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -12803,52 +12803,52 @@ - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTempe - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; } - (NSDictionary * _Nullable)readAttributeOutdoorTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) params:params]; } - (NSDictionary * _Nullable)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; } - (NSDictionary * _Nullable)readAttributeAbsMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; } - (NSDictionary * _Nullable)readAttributePICoolingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) params:params]; } - (NSDictionary * _Nullable)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; } - (NSDictionary * _Nullable)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12859,12 +12859,12 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary * _Nullable)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12875,12 +12875,12 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary * _Nullable)readAttributeOccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12891,12 +12891,12 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary * _Nullable)readAttributeOccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12907,12 +12907,12 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary * _Nullable)readAttributeUnoccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12923,12 +12923,12 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary * _Nullable)readAttributeUnoccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12939,12 +12939,12 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary * _Nullable)readAttributeMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12955,12 +12955,12 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary * _Nullable)readAttributeMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12971,12 +12971,12 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary * _Nullable)readAttributeMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -12987,12 +12987,12 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary * _Nullable)readAttributeMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13003,12 +13003,12 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary * _Nullable)readAttributeMinSetpointDeadBandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) params:params]; } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13019,12 +13019,12 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeRemoteSensingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) params:params]; } - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13035,12 +13035,12 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeControlSequenceOfOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) params:params]; } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13051,12 +13051,12 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary * _Nullable)readAttributeSystemModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) params:params]; } - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13067,32 +13067,32 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeThermostatRunningModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartOfWeekWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfWeeklyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfDailyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeTemperatureSetpointHoldWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13103,12 +13103,12 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary * _Nullable)readAttributeTemperatureSetpointHoldDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13119,12 +13119,12 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary * _Nullable)readAttributeThermostatProgrammingOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) params:params]; } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13135,32 +13135,32 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeThermostatRunningStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeSetpointChangeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) params:params]; } - (NSDictionary * _Nullable)readAttributeSetpointChangeAmountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) params:params]; } - (NSDictionary * _Nullable)readAttributeSetpointChangeSourceTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; } - (NSDictionary * _Nullable)readAttributeOccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) params:params]; } - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13171,22 +13171,22 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeOccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeUnoccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) params:params]; } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13197,22 +13197,22 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUnoccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeUnoccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeEmergencyHeatDeltaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13223,12 +13223,12 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) params:params]; } - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13239,12 +13239,12 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) params:params]; } - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13255,12 +13255,12 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACRefrigerantTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) params:params]; } - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13271,12 +13271,12 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACCompressorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) params:params]; } - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13287,12 +13287,12 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACErrorCodeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) params:params]; } - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13303,12 +13303,12 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACLouverPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) params:params]; } - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13319,17 +13319,17 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeACCoilTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) params:params]; } - (NSDictionary * _Nullable)readAttributeACCapacityformatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) params:params]; } - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13340,52 +13340,52 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePresetTypesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetTypesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetTypesID) params:params]; } - (NSDictionary * _Nullable)readAttributeScheduleTypesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeScheduleTypesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeScheduleTypesID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfPresetsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfPresetsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfPresetsID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfSchedulesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfSchedulesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfSchedulesID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionPerDayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionPerDayID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePresetHandleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActivePresetHandleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActivePresetHandleID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveScheduleHandleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActiveScheduleHandleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActiveScheduleHandleID) params:params]; } - (NSDictionary * _Nullable)readAttributePresetsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) params:params]; } - (void)writeAttributePresetsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13396,12 +13396,12 @@ - (void)writeAttributePresetsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSchedulesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) params:params]; } - (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13412,57 +13412,57 @@ - (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePresetsSchedulesEditableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsSchedulesEditableID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsSchedulesEditableID) params:params]; } - (NSDictionary * _Nullable)readAttributeTemperatureSetpointHoldPolicyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldPolicyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldPolicyID) params:params]; } - (NSDictionary * _Nullable)readAttributeSetpointHoldExpiryTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID) params:params]; } - (NSDictionary * _Nullable)readAttributeQueuedPresetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) params:params]; } @end @@ -13519,7 +13519,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params expectedValues:( auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = FanControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13534,7 +13534,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params expectedValues:( - (NSDictionary * _Nullable)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) params:params]; } - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13545,12 +13545,12 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeFanModeSequenceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) params:params]; } - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13561,12 +13561,12 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePercentSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) params:params]; } - (void)writeAttributePercentSettingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13577,22 +13577,22 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePercentCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeSpeedMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeSpeedSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) params:params]; } - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13603,22 +13603,22 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeRockSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) params:params]; } - (NSDictionary * _Nullable)readAttributeRockSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) params:params]; } - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13629,17 +13629,17 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeWindSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) params:params]; } - (NSDictionary * _Nullable)readAttributeWindSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) params:params]; } - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13650,12 +13650,12 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) params:params]; } - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13666,37 +13666,37 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) params:params]; } @end @@ -13714,7 +13714,7 @@ @implementation MTRClusterThermostatUserInterfaceConfiguration - (NSDictionary * _Nullable)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) params:params]; } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13725,12 +13725,12 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary * _Nullable)readAttributeKeypadLockoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) params:params]; } - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13741,12 +13741,12 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeScheduleProgrammingVisibilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) params:params]; } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -13757,37 +13757,37 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -13817,7 +13817,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13844,7 +13844,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params expected auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13871,7 +13871,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params expected auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13898,7 +13898,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13925,7 +13925,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13952,7 +13952,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -13979,7 +13979,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14006,7 +14006,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14033,7 +14033,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params expe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14060,7 +14060,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params expe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepColor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14087,7 +14087,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveToColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14114,7 +14114,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14141,7 +14141,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14168,7 +14168,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedStepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14195,7 +14195,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14222,7 +14222,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::ColorLoopSet::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14249,7 +14249,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StopMoveStep::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14276,7 +14276,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::MoveColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14303,7 +14303,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ColorControl::Commands::StepColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -14318,52 +14318,52 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary * _Nullable)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; } - (NSDictionary * _Nullable)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; } - (NSDictionary * _Nullable)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; } - (NSDictionary * _Nullable)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; } - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14374,107 +14374,107 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; } - (NSDictionary * _Nullable)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; } - (NSDictionary * _Nullable)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) params:params]; } - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14485,12 +14485,12 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) params:params]; } - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14501,12 +14501,12 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) params:params]; } - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14517,12 +14517,12 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) params:params]; } - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14533,12 +14533,12 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) params:params]; } - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14549,12 +14549,12 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary * _Nullable)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) params:params]; } - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14565,12 +14565,12 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; } - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14581,12 +14581,12 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; } - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14597,12 +14597,12 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary * _Nullable)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; } - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14613,12 +14613,12 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) params:params]; } - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14629,12 +14629,12 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) params:params]; } - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14645,67 +14645,67 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary * _Nullable)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) params:params]; } - (NSDictionary * _Nullable)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; } - (NSDictionary * _Nullable)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; } - (NSDictionary * _Nullable)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14716,37 +14716,37 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) params:params]; } @end @@ -14859,22 +14859,22 @@ @implementation MTRClusterBallastConfiguration - (NSDictionary * _Nullable)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) params:params]; } - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14885,12 +14885,12 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) params:params]; } - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14901,12 +14901,12 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) params:params]; } - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14917,12 +14917,12 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary * _Nullable)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) params:params]; } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14933,17 +14933,17 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary * _Nullable)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) params:params]; } - (NSDictionary * _Nullable)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) params:params]; } - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14954,12 +14954,12 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) params:params]; } - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14970,12 +14970,12 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; } - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14986,12 +14986,12 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; } - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15002,12 +15002,12 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; } - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15018,12 +15018,12 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15034,37 +15034,37 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) params:params]; } @end @@ -15094,57 +15094,57 @@ @implementation MTRClusterIlluminanceMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15162,52 +15162,52 @@ @implementation MTRClusterTemperatureMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15225,77 +15225,77 @@ @implementation MTRClusterPressureMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15313,52 +15313,52 @@ @implementation MTRClusterFlowMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15376,52 +15376,52 @@ @implementation MTRClusterRelativeHumidityMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15439,22 +15439,22 @@ @implementation MTRClusterOccupancySensing - (NSDictionary * _Nullable)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; } - (NSDictionary * _Nullable)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; } - (NSDictionary * _Nullable)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; } - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15465,12 +15465,12 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; } - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15481,12 +15481,12 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; } - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15497,12 +15497,12 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary * _Nullable)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15513,12 +15513,12 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15529,12 +15529,12 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15545,12 +15545,12 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15561,12 +15561,12 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15577,12 +15577,12 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -15593,37 +15593,37 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; } @end @@ -15677,87 +15677,87 @@ @implementation MTRClusterCarbonMonoxideConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15766,87 +15766,87 @@ @implementation MTRClusterCarbonDioxideConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15855,87 +15855,87 @@ @implementation MTRClusterNitrogenDioxideConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -15944,87 +15944,87 @@ @implementation MTRClusterOzoneConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16033,87 +16033,87 @@ @implementation MTRClusterPM25ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16122,87 +16122,87 @@ @implementation MTRClusterFormaldehydeConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16211,87 +16211,87 @@ @implementation MTRClusterPM1ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16300,87 +16300,87 @@ @implementation MTRClusterPM10ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16389,87 +16389,87 @@ @implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16478,87 +16478,87 @@ @implementation MTRClusterRadonConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -16567,42 +16567,42 @@ @implementation MTRClusterWakeOnLAN - (NSDictionary * _Nullable)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; } - (NSDictionary * _Nullable)readAttributeLinkLocalAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeLinkLocalAddressID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeLinkLocalAddressID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; } @end @@ -16634,7 +16634,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::ChangeChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16661,7 +16661,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::ChangeChannelByNumber::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16688,7 +16688,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expec auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::SkipChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16719,7 +16719,7 @@ - (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::GetProgramGuide::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16746,7 +16746,7 @@ - (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::RecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16773,7 +16773,7 @@ - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParam auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = Channel::Commands::CancelRecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16788,47 +16788,47 @@ - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParam - (NSDictionary * _Nullable)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; } - (NSDictionary * _Nullable)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; } @end @@ -16876,7 +16876,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = TargetNavigator::Commands::NavigateTarget::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16891,42 +16891,42 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary * _Nullable)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; } @end @@ -16968,7 +16968,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Play::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -16999,7 +16999,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17030,7 +17030,7 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17061,7 +17061,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::StartOver::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17092,7 +17092,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Previous::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17123,7 +17123,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Next::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17154,7 +17154,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Rewind::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17185,7 +17185,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::FastForward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17212,7 +17212,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::SkipForward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17239,7 +17239,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::SkipBackward::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17266,7 +17266,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValue auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::Seek::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17293,7 +17293,7 @@ - (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17320,7 +17320,7 @@ - (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17351,7 +17351,7 @@ - (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrac auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17366,87 +17366,87 @@ - (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrac - (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; } - (NSDictionary * _Nullable)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; } - (NSDictionary * _Nullable)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; } - (NSDictionary * _Nullable)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; } - (NSDictionary * _Nullable)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveAudioTrackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveAudioTrackID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveAudioTrackID) params:params]; } - (NSDictionary * _Nullable)readAttributeAvailableAudioTracksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableAudioTracksID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableAudioTracksID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveTextTrackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveTextTrackID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveTextTrackID) params:params]; } - (NSDictionary * _Nullable)readAttributeAvailableTextTracksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableTextTracksID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableTextTracksID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; } @end @@ -17596,7 +17596,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::SelectInput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17627,7 +17627,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::ShowInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17658,7 +17658,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::HideInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17685,7 +17685,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = MediaInput::Commands::RenameInput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17700,42 +17700,42 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params ex - (NSDictionary * _Nullable)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; } @end @@ -17797,7 +17797,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expect auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = LowPower::Commands::Sleep::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17812,32 +17812,32 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expect - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; } @end @@ -17876,7 +17876,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedV auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = KeypadInput::Commands::SendKey::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17891,32 +17891,32 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedV - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; } @end @@ -17954,7 +17954,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentLauncher::Commands::LaunchContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17981,7 +17981,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentLauncher::Commands::LaunchURL::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -17996,12 +17996,12 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params e - (NSDictionary * _Nullable)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -18012,37 +18012,37 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; } @end @@ -18088,7 +18088,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = AudioOutput::Commands::SelectOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18115,7 +18115,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = AudioOutput::Commands::RenameOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18130,42 +18130,42 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary * _Nullable)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; } @end @@ -18209,7 +18209,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18240,7 +18240,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::StopApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18271,7 +18271,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ApplicationLauncher::Commands::HideApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18286,12 +18286,12 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary * _Nullable)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; } - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -18302,37 +18302,37 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; } @end @@ -18374,72 +18374,72 @@ @implementation MTRClusterApplicationBasic - (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; } - (NSDictionary * _Nullable)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; } - (NSDictionary * _Nullable)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; } - (NSDictionary * _Nullable)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; } - (NSDictionary * _Nullable)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; } - (NSDictionary * _Nullable)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; } @end @@ -18472,7 +18472,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params } using RequestType = AccountLogin::Commands::GetSetupPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18502,7 +18502,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValu } using RequestType = AccountLogin::Commands::Login::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18536,7 +18536,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params } using RequestType = AccountLogin::Commands::Logout::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18551,32 +18551,32 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; } @end @@ -18628,7 +18628,7 @@ - (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::UpdatePIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18659,7 +18659,7 @@ - (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::ResetPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18690,7 +18690,7 @@ - (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::Enable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18721,7 +18721,7 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18752,7 +18752,7 @@ - (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::AddBonusTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18779,7 +18779,7 @@ - (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTime auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18810,7 +18810,7 @@ - (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedConte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::BlockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18841,7 +18841,7 @@ - (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedC auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18868,7 +18868,7 @@ - (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDeman auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18895,7 +18895,7 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -18910,72 +18910,72 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe - (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEnabledID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnDemandRatingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingsID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnDemandRatingThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingThresholdID) params:params]; } - (NSDictionary * _Nullable)readAttributeScheduledContentRatingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingsID) params:params]; } - (NSDictionary * _Nullable)readAttributeScheduledContentRatingThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingThresholdID) params:params]; } - (NSDictionary * _Nullable)readAttributeScreenDailyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScreenDailyTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScreenDailyTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeRemainingScreenTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeRemainingScreenTimeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeRemainingScreenTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeBlockUnratedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeClusterRevisionID) params:params]; } @end @@ -18996,7 +18996,7 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19011,32 +19011,32 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID) params:params]; } @end @@ -19061,7 +19061,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19088,7 +19088,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19103,297 +19103,297 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; } - (NSDictionary * _Nullable)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; } - (NSDictionary * _Nullable)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19404,12 +19404,12 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19420,12 +19420,12 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19436,12 +19436,12 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19452,12 +19452,12 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19468,12 +19468,12 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19484,42 +19484,42 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary * _Nullable)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; } - (NSDictionary * _Nullable)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19530,22 +19530,22 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -19556,307 +19556,307 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary * _Nullable)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; } - (NSDictionary * _Nullable)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; } - (NSDictionary * _Nullable)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; } @end @@ -19904,7 +19904,7 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params expec auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::Test::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19935,7 +19935,7 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNotHandled::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19966,7 +19966,7 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSpecific::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -19997,7 +19997,7 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestUnknownCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20024,7 +20024,7 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestAddArguments::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20051,7 +20051,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSimpleArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20078,7 +20078,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestStructArrayArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20105,7 +20105,7 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20132,7 +20132,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNestedStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20159,7 +20159,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListStructArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20186,7 +20186,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListInt8UArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20213,7 +20213,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNestedStructListArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20240,7 +20240,7 @@ - (void)testListNestedStructListArgumentRequestWithParams:(MTRUnitTestingCluster auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20267,7 +20267,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestListInt8UReverseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20294,7 +20294,7 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEnumsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20325,7 +20325,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestNullableOptionalRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20352,7 +20352,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestComplexNullableOptionalRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20379,7 +20379,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::SimpleStructEchoRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20413,7 +20413,7 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar } using RequestType = UnitTesting::Commands::TimedInvokeRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20444,7 +20444,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20471,7 +20471,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEmitTestEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20498,7 +20498,7 @@ - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTes auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20525,7 +20525,7 @@ - (void)testBatchHelperRequestWithParams:(MTRUnitTestingClusterTestBatchHelperRe auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestBatchHelperRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20552,7 +20552,7 @@ - (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondB auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestSecondBatchHelperRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -20594,7 +20594,7 @@ - (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDiffer - (NSDictionary * _Nullable)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; } - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20605,12 +20605,12 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) params:params]; } - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20621,12 +20621,12 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) params:params]; } - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20637,12 +20637,12 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) params:params]; } - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20653,12 +20653,12 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) params:params]; } - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20669,12 +20669,12 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) params:params]; } - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20685,12 +20685,12 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) params:params]; } - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20701,12 +20701,12 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) params:params]; } - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20717,12 +20717,12 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) params:params]; } - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20733,12 +20733,12 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) params:params]; } - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20749,12 +20749,12 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) params:params]; } - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20765,12 +20765,12 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) params:params]; } - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20781,12 +20781,12 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) params:params]; } - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20797,12 +20797,12 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) params:params]; } - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20813,12 +20813,12 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) params:params]; } - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20829,12 +20829,12 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) params:params]; } - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20845,12 +20845,12 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) params:params]; } - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20861,12 +20861,12 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) params:params]; } - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20877,12 +20877,12 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) params:params]; } - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20893,12 +20893,12 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) params:params]; } - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20909,12 +20909,12 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) params:params]; } - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20925,12 +20925,12 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) params:params]; } - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20941,12 +20941,12 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) params:params]; } - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20957,12 +20957,12 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) params:params]; } - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20973,12 +20973,12 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) params:params]; } - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -20989,12 +20989,12 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) params:params]; } - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21005,12 +21005,12 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) params:params]; } - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21021,12 +21021,12 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) params:params]; } - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21037,12 +21037,12 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID) params:params]; } - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21053,12 +21053,12 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary * _Nullable)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) params:params]; } - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21069,12 +21069,12 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) params:params]; } - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21085,12 +21085,12 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) params:params]; } - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21101,12 +21101,12 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) params:params]; } - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21117,12 +21117,12 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) params:params]; } - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21133,12 +21133,12 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) params:params]; } - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21149,12 +21149,12 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID) params:params]; } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21165,12 +21165,12 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary * _Nullable)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) params:params]; } - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21181,12 +21181,12 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) params:params]; } - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21197,12 +21197,12 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID) params:params]; } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21213,12 +21213,12 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary * _Nullable)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID) params:params]; } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21229,12 +21229,12 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary * _Nullable)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID) params:params]; } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21245,12 +21245,12 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary * _Nullable)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID) params:params]; } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21261,12 +21261,12 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary * _Nullable)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) params:params]; } - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21277,12 +21277,12 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) params:params]; } - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21293,12 +21293,12 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) params:params]; } - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21312,12 +21312,12 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * timedWriteTimeout = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); } - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) params:params]; } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21328,12 +21328,12 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) params:params]; } - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21344,12 +21344,12 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) params:params]; } - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21360,12 +21360,12 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; } - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21376,12 +21376,12 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) params:params]; } - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21392,12 +21392,12 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) params:params]; } - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21408,12 +21408,12 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) params:params]; } - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21424,12 +21424,12 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) params:params]; } - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21440,12 +21440,12 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) params:params]; } - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21456,12 +21456,12 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) params:params]; } - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21472,12 +21472,12 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) params:params]; } - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21488,12 +21488,12 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) params:params]; } - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21504,12 +21504,12 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) params:params]; } - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21520,12 +21520,12 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) params:params]; } - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21536,12 +21536,12 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) params:params]; } - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21552,12 +21552,12 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) params:params]; } - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21568,12 +21568,12 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) params:params]; } - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21584,12 +21584,12 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) params:params]; } - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21600,12 +21600,12 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) params:params]; } - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21616,12 +21616,12 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) params:params]; } - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21632,12 +21632,12 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) params:params]; } - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21648,12 +21648,12 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) params:params]; } - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21664,12 +21664,12 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) params:params]; } - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21680,12 +21680,12 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) params:params]; } - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21696,12 +21696,12 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) params:params]; } - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21712,12 +21712,12 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) params:params]; } - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21728,12 +21728,12 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) params:params]; } - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21744,12 +21744,12 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) params:params]; } - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21760,12 +21760,12 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) params:params]; } - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21776,12 +21776,12 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) params:params]; } - (void)writeAttributeNullableCharStringWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21792,12 +21792,12 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) params:params]; } - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21808,12 +21808,12 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) params:params]; } - (void)writeAttributeNullableStructWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21824,12 +21824,12 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID) params:params]; } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21840,12 +21840,12 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary * _Nullable)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID) params:params]; } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21856,12 +21856,12 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary * _Nullable)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID) params:params]; } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21872,12 +21872,12 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary * _Nullable)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID) params:params]; } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21888,12 +21888,12 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary * _Nullable)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) params:params]; } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21904,37 +21904,37 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeiInt8uWithParams:(MTRReadParams * _Nullable)params @@ -22175,7 +22175,7 @@ - (void)pingWithParams:(MTRSampleMEIClusterPingParams * _Nullable)params expecte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SampleMei::Commands::Ping::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -22202,7 +22202,7 @@ - (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = SampleMei::Commands::AddArguments::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -22217,7 +22217,7 @@ - (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params e - (NSDictionary * _Nullable)readAttributeFlipFlopWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID) params:params]; } - (void)writeAttributeFlipFlopWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -22228,37 +22228,37 @@ - (void)writeAttributeFlipFlopWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeClusterRevisionID) params:params]; } @end diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 9938d4567f9935..645fdc0acf7415 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -2892,6 +2892,19 @@ - (void)test029_PathsBehavior XCTAssertFalse([clusterPath1 isEqual:eventPath1]); } +- (void)test030_DeviceAndClusterProperties +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + __auto_type * device = [MTRDevice deviceWithNodeID:@(kDeviceId) controller:sController]; + XCTAssertEqual(device.deviceController, sController); + XCTAssertEqualObjects(device.nodeID, @(kDeviceId)); + + __auto_type * cluster = [[MTRClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:queue]; + XCTAssertEqual(cluster.device, device); + XCTAssertEqualObjects(cluster.endpointID, @(0)); +} + - (void)test999_TearDown { ResetCommissionee(GetConnectedDevice(), dispatch_get_main_queue(), self, kTimeoutInSeconds); diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift index 061f093ce9ce79..4a35a431347045 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift @@ -95,7 +95,7 @@ class MTRSwiftDeviceTestDelegate : NSObject, MTRDeviceDelegate { class MTRSwiftDeviceTests : XCTestCase { static var sStackInitRan : Bool = false static var sNeedsStackShutdown : Bool = true - + static override func tearDown() { // Global teardown, runs once if (sNeedsStackShutdown) { @@ -106,49 +106,49 @@ class MTRSwiftDeviceTests : XCTestCase { shutdownStack() } } - + override func setUp() { // Per-test setup, runs before each test. super.setUp() self.continueAfterFailure = false - + if (!MTRSwiftDeviceTests.sStackInitRan) { initStack() } } - + override func tearDown() { // Per-test teardown, runs after each test. super.tearDown() } - + func initStack() { MTRSwiftDeviceTests.sStackInitRan = true - + let factory = MTRDeviceControllerFactory.sharedInstance() - + let storage = MTRTestStorage() let factoryParams = MTRDeviceControllerFactoryParams(storage: storage) - + do { try factory.start(factoryParams) } catch { XCTFail("Count not start controller factory: \(error)") } XCTAssertTrue(factory.isRunning) - + let testKeys = MTRTestKeys() - + sTestKeys = testKeys - + // Needs to match what startControllerOnExistingFabric calls elsewhere in // this file do. let params = MTRDeviceControllerStartupParams(ipk: testKeys.ipk, fabricID: 1, nocSigner:testKeys) params.vendorID = DeviceConstants.testVendorID as NSNumber - + let controller : MTRDeviceController do { controller = try factory.createController(onNewFabric: params) @@ -157,16 +157,16 @@ class MTRSwiftDeviceTests : XCTestCase { return } XCTAssertTrue(controller.isRunning) - + sController = controller - + let expectation = expectation(description : "Commissioning Complete") - + let controllerDelegate = MTRSwiftDeviceTestControllerDelegate(withExpectation: expectation) let serialQueue = DispatchQueue(label: "com.chip.device_controller_delegate") - + controller.setDeviceControllerDelegate(controllerDelegate, queue: serialQueue) - + let payload : MTRSetupPayload do { payload = try MTRSetupPayload(onboardingPayload: DeviceConstants.onboardingPayload) @@ -174,54 +174,54 @@ class MTRSwiftDeviceTests : XCTestCase { XCTFail("Could not parse setup payload: \(error)") return } - + do { try controller.setupCommissioningSession(with:payload, newNodeID: DeviceConstants.deviceID as NSNumber) } catch { XCTFail("Could not start setting up PASE session: \(error)") return } - + wait(for: [expectation], timeout: DeviceConstants.pairingTimeoutInSeconds) } - + static func shutdownStack() { sNeedsStackShutdown = false - + let controller = sController XCTAssertNotNil(controller) - + controller!.shutdown() XCTAssertFalse(controller!.isRunning) - + MTRDeviceControllerFactory.sharedInstance().stop() } - + func test000_SetUp() { // Nothing to do here; our setUp method handled this already. This test // just exists to make the setup not look like it's happening inside other // tests. } - + func test017_TestMTRDeviceBasics() { let device = MTRDevice(nodeID: DeviceConstants.deviceID as NSNumber, controller:sController!) let queue = DispatchQueue.main - + // Given reachable state becomes true before underlying OnSubscriptionEstablished callback, this expectation is necessary but // not sufficient as a mark to the end of reports let subscriptionExpectation = expectation(description: "Subscription has been set up") - + let delegate = MTRSwiftDeviceTestDelegate(withReachableHandler: { () -> Void in subscriptionExpectation.fulfill() }) - + var attributeReportsReceived : Int = 0 delegate.onAttributeDataReceived = { (data: [[ String: Any ]]) -> Void in attributeReportsReceived += data.count } - + // This is dependent on current implementation that priming reports send attributes and events in that order, and also that // events in this test would fit in one report. So receiving events would mean all attributes and events have been received, and // can satisfy the test below. @@ -229,7 +229,7 @@ class MTRSwiftDeviceTests : XCTestCase { var eventReportsReceived : Int = 0 delegate.onEventDataReceived = { (eventReport: [[ String: Any ]]) -> Void in eventReportsReceived += eventReport.count - + for eventDict in eventReport { let eventTimeTypeNumber = eventDict[MTREventTimeTypeKey] as! NSNumber? XCTAssertNotNil(eventTimeTypeNumber) @@ -246,42 +246,42 @@ class MTRSwiftDeviceTests : XCTestCase { delegate.onReportEnd = { () -> Void in gotReportsExpectation.fulfill() } - + device.setDelegate(_: delegate, queue:queue) - + // Test batching and duplicate check // - Read 13 different attributes in a row, expect that the 1st to go out by itself, the next 9 batch, and then the 3 after // are correctly queued in one batch // - Then read 3 duplicates and expect them to be filtered // - Note that these tests can only be verified via logs device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 0, params: nil) - + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 1, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 2, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 3, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 4, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 5, params: nil) - + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 6, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 7, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 0, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 1, params: nil) - + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 2, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 3, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 4, params: nil) - + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 4, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 4, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 4, params: nil) - + wait(for: [ subscriptionExpectation, gotReportsExpectation ], timeout:60) - + delegate.onReportEnd = nil - + XCTAssertNotEqual(attributeReportsReceived, 0) XCTAssertNotEqual(eventReportsReceived, 0) - + // Before resubscribe, first test write failure and expected value effects let testEndpointID = 1 as NSNumber let testClusterID = 8 as NSNumber @@ -304,7 +304,7 @@ class MTRSwiftDeviceTests : XCTestCase { } } } - + let writeValue = [ "type": "UnsignedInteger", "value": 200 ] as [String: Any] device.writeAttribute(withEndpointID: testEndpointID, clusterID: testClusterID, @@ -312,11 +312,11 @@ class MTRSwiftDeviceTests : XCTestCase { value: writeValue, expectedValueInterval: 20000, timedWriteTimeout:nil) - + // expected value interval is 20s but expect it get reverted immediately as the write fails because it's writing to a // nonexistent attribute wait(for: [ expectedValueReportedExpectation, expectedValueRemovedExpectation ], timeout: 5, enforceOrder: true) - + // Test if errors are properly received let attributeReportErrorExpectation = expectation(description: "Attribute read error") delegate.onAttributeDataReceived = { (data: [[ String: Any ]]) -> Void in @@ -329,7 +329,7 @@ class MTRSwiftDeviceTests : XCTestCase { // use the nonexistent attribute and expect read error device.readAttribute(withEndpointID: testEndpointID, clusterID: testClusterID, attributeID: testAttributeID, params: nil) wait(for: [ attributeReportErrorExpectation ], timeout: 10) - + // Resubscription test setup let subscriptionDroppedExpectation = expectation(description: "Subscription has dropped") delegate.onNotReachable = { () -> Void in @@ -339,18 +339,18 @@ class MTRSwiftDeviceTests : XCTestCase { delegate.onReachable = { () -> Void in resubscriptionExpectation.fulfill() }; - + // reset the onAttributeDataReceived to validate the following resubscribe test attributeReportsReceived = 0; eventReportsReceived = 0; delegate.onAttributeDataReceived = { (data: [[ String: Any ]]) -> Void in attributeReportsReceived += data.count; }; - + delegate.onEventDataReceived = { (eventReport: [[ String: Any ]]) -> Void in eventReportsReceived += eventReport.count; }; - + // Now trigger another subscription which will cause ours to drop; we should re-subscribe after that. let baseDevice = sConnectedDevice let params = MTRSubscribeParams(minInterval: 1, maxInterval: 2) @@ -364,41 +364,41 @@ class MTRSwiftDeviceTests : XCTestCase { params: params, queue: queue, reportHandler: { (_: [[String : Any]]?, _: Error?) -> Void in - }) - + }) + wait(for: [ subscriptionDroppedExpectation ], timeout:60) - + // Check that device resets start time on subscription drop XCTAssertNil(device.estimatedStartTime) - + wait(for: [ resubscriptionExpectation ], timeout:60) - + // Now make sure we ignore later tests. Ideally we would just unsubscribe // or remove the delegate, but there's no good way to do that. delegate.onReachable = { () -> Void in } delegate.onNotReachable = nil delegate.onAttributeDataReceived = nil delegate.onEventDataReceived = nil - + // Make sure we got no updated reports (because we had a cluster state cache // with data versions) during the resubscribe. XCTAssertEqual(attributeReportsReceived, 0); XCTAssertEqual(eventReportsReceived, 0); } - + func test018_SubscriptionErrorWhenNotResubscribing() { let device = sConnectedDevice! let queue = DispatchQueue.main - + let firstSubscribeExpectation = expectation(description: "First subscription complete") let errorExpectation = expectation(description: "First subscription errored out") - + // Subscribe let params = MTRSubscribeParams(minInterval: 1, maxInterval: 10) params.shouldResubscribeAutomatically = false params.shouldReplaceExistingSubscriptions = true // Not strictly needed, but checking that doing this does not - // affect this subscription erroring out correctly. + // affect this subscription erroring out correctly. var subscriptionEstablished = false device.subscribeToAttributes(withEndpointID: 1, clusterID: 6, @@ -422,14 +422,14 @@ class MTRSwiftDeviceTests : XCTestCase { subscriptionEstablished = true firstSubscribeExpectation.fulfill() }) - + // Wait till establishment wait(for: [ firstSubscribeExpectation ], timeout: DeviceConstants.timeoutInSeconds) - + // Create second subscription which will cancel the first subscription. We // can use a non-existent path here to cut down on the work that gets done. params.shouldReplaceExistingSubscriptions = true - + device.subscribeToAttributes(withEndpointID: 10000, clusterID: 6, attributeID: 0, @@ -439,16 +439,16 @@ class MTRSwiftDeviceTests : XCTestCase { }) wait(for: [ errorExpectation ], timeout: 60) } - + func test019_MTRDeviceMultipleCommands() async { let device = MTRDevice(nodeID: DeviceConstants.deviceID as NSNumber, controller:sController!) let queue = DispatchQueue.main - + let opcredsCluster = MTRClusterOperationalCredentials(device: device, endpointID: 0, queue: queue)! let onOffCluster = MTRClusterOnOff(device: device, endpointID: 1, queue: queue)! let badOnOffCluster = MTRClusterOnOff(device: device, endpointID: 0, queue: queue)! - + // Ensure our existing fabric label is not "Test". This uses a "base" // cluster to ensure read-through to the other side. let baseOpCredsCluster = MTRBaseClusterOperationalCredentials(device: sConnectedDevice!, endpointID: 0, queue: queue)! @@ -456,9 +456,9 @@ class MTRSwiftDeviceTests : XCTestCase { XCTAssertEqual(fabricList.count, 1) var entry = fabricList[0] as! MTROperationalCredentialsClusterFabricDescriptorStruct XCTAssertNotEqual(entry.label, "Test") - + let currentFabricIndex = try! await baseOpCredsCluster.readAttributeCurrentFabricIndex() - + // NOTE: The command invocations do not use "await", because we actually want // to do them all sort of in parallel, or at least queue them all on the MTRDevice // before we get a chance to finish the first one. @@ -467,13 +467,13 @@ class MTRSwiftDeviceTests : XCTestCase { XCTAssertNil(error) onExpectation.fulfill() } - + let offFailedExpectation = expectation(description: "Off command failed") badOnOffCluster.off(withExpectedValues: nil, expectedValueInterval: nil) { error in XCTAssertNotNil(error) offFailedExpectation.fulfill() } - + let updateLabelExpectation = expectation(description: "Fabric label updated") let params = MTROperationalCredentialsClusterUpdateFabricLabelParams() params.label = "Test" @@ -484,7 +484,7 @@ class MTRSwiftDeviceTests : XCTestCase { XCTAssertEqual(data?.fabricIndex, currentFabricIndex) updateLabelExpectation.fulfill() } - + let offExpectation = expectation(description: "Off command executed") // Send this one via MTRDevice, to test that codepath device.invokeCommand(withEndpointID: 1, @@ -497,13 +497,13 @@ class MTRSwiftDeviceTests : XCTestCase { XCTAssertNil(error) offExpectation.fulfill() } - + let onFailedExpectation = expectation(description: "On command failed") badOnOffCluster.on(withExpectedValues: nil, expectedValueInterval: nil) { error in XCTAssertNotNil(error) onFailedExpectation.fulfill() } - + let updateLabelFailedExpectation = expectation(description: "Fabric label update failed") params.label = "12345678901234567890123445678901234567890" // Too long opcredsCluster.updateFabricLabel(with: params, @@ -513,7 +513,7 @@ class MTRSwiftDeviceTests : XCTestCase { XCTAssertNil(data) updateLabelFailedExpectation.fulfill() } - + wait(for: [ onExpectation, offFailedExpectation, updateLabelExpectation, @@ -522,7 +522,7 @@ class MTRSwiftDeviceTests : XCTestCase { updateLabelFailedExpectation ], timeout: 60, enforceOrder: true) - + // Now make sure our fabric label got updated. fabricList = try! await baseOpCredsCluster.readAttributeFabrics(with: nil) XCTAssertNotNil(fabricList) @@ -530,9 +530,21 @@ class MTRSwiftDeviceTests : XCTestCase { entry = fabricList[0] as! MTROperationalCredentialsClusterFabricDescriptorStruct XCTAssertEqual(entry.label, "Test") } - + // Note: test027_AttestationChallenge is not implementable in Swift so far, // because the attestationChallenge property is internal-only + + func test030_DeviceAndClusterProperties() { + let queue = DispatchQueue.main + + let device = MTRDevice(nodeID: DeviceConstants.deviceID as NSNumber, controller:sController!) + XCTAssertEqual(device.deviceController, sController) + XCTAssertEqual(device.__nodeID, DeviceConstants.deviceID as NSNumber) + + let cluster = MTRClusterOperationalCredentials(device: device, endpointID: 0, queue: queue)! + XCTAssertEqual(cluster.device, device) + XCTAssertEqual(cluster.__endpointID, 0 as NSNumber) + } func test999_TearDown() { From 8c39bd3fdf16ef61f3d17efbaeb420bb9074e650 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 24 Jan 2024 11:22:05 -0500 Subject: [PATCH 15/45] Fix incorrect ZAP generation on tip. (#31661) Looks like a bad merge: a PR that changed codegen landed in parallel with a PR that added new things to be generated. --- .../Framework/CHIP/zap-generated/MTRBaseClusters.mm | 8 ++++---- src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 693c9dd8620b5e..7a02734aca7b6e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -111430,7 +111430,7 @@ - (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDiffer auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestDifferentVendorMeiRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -117427,7 +117427,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeMeiInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -117458,7 +117458,7 @@ - (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWr TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -117468,7 +117468,7 @@ - (void)subscribeAttributeMeiInt8uWithParams:(MTRSubscribeParams * _Nonnull)para reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitTesting::Attributes::MeiInt8u::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index d2064b7991354b..63edcb6fb3e1b6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -20579,7 +20579,7 @@ - (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDiffer auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; using RequestType = UnitTesting::Commands::TestDifferentVendorMeiRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params @@ -21939,7 +21939,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary * _Nullable)readAttributeMeiInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) params:params]; } - (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -21950,7 +21950,7 @@ - (void)writeAttributeMeiInt8uWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } @end From 1c604a62953e662671e6e3bc493c74d402f01dc0 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 24 Jan 2024 11:41:12 -0500 Subject: [PATCH 16/45] Add batch invoke integration tests to CI (#31642) * Add batch invoke tests to CI * Restyled by autopep8 * Fix CI and address PR comment * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- .github/workflows/tests.yaml | 3 +- src/python_testing/TestBatchInvoke.py | 109 ++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 src/python_testing/TestBatchInvoke.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b5ed62592ecfc6..4781ff8280d868 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -467,6 +467,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TestGroupTableReports.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TestBatchInvoke.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_2.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_4.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' @@ -484,6 +485,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_4_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' @@ -591,4 +593,3 @@ jobs: path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 - diff --git a/src/python_testing/TestBatchInvoke.py b/src/python_testing/TestBatchInvoke.py new file mode 100644 index 00000000000000..e1f848ae9b1919 --- /dev/null +++ b/src/python_testing/TestBatchInvoke.py @@ -0,0 +1,109 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +''' Integration test of batch commands using UnitTesting Cluster + +This test is meant to test cases not covered in IDM_1_4 as a result of not being able to control +how DUT processes commands. +''' + + +class TestBatchInvoke(MatterBaseTest): + + @async_test_body + async def test_batch_invoke(self): + dev_ctrl = self.default_controller + dut_node_id = self.dut_node_id + + self.print_step(0, "Commissioning - already done") + + self.print_step(1, "Get remote node's MaxPathsPerInvoke") + session_parameters = dev_ctrl.GetRemoteSessionParameters(dut_node_id) + max_paths_per_invoke = session_parameters.maxPathsPerInvoke + + asserts.assert_greater_equal(max_paths_per_invoke, 2, "Test expects to be able to send at least 2 commands") + asserts.assert_less_equal(max_paths_per_invoke, 65535, "Max Paths per Invoke greater than spec max") + + self.print_step(1, "Send simple batch commands to UnitTesting Cluster") + response_size = 7 + endpoint = 1 + request_1_fill_character = b"a" + request_2_fill_character = b"b" + command = Clusters.UnitTesting.Commands.TestBatchHelperRequest( + sleepBeforeResponseTimeMs=0, sizeOfResponseBuffer=response_size, fillCharacter=ord(request_1_fill_character)) + invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) + command = Clusters.UnitTesting.Commands.TestSecondBatchHelperRequest( + sleepBeforeResponseTimeMs=0, sizeOfResponseBuffer=response_size, fillCharacter=ord(request_2_fill_character)) + invoke_request_2 = Clusters.Command.InvokeRequestInfo(endpoint, command) + try: + result = await dev_ctrl.SendBatchCommands(dut_node_id, [invoke_request_1, invoke_request_2]) + except InteractionModelError: + asserts.fail("DUT failed to successfully responded to a InvokeRequest action with two valid commands") + + asserts.assert_true(type_matches(result, list), "Unexpected return from SendBatchCommands") + asserts.assert_equal(len(result), 2, "Unexpected number of InvokeResponses sent back from DUT") + asserts.assert_true(type_matches( + result[0], Clusters.UnitTesting.Commands.TestBatchHelperResponse), "Unexpected return type for first InvokeRequest") + asserts.assert_true(type_matches( + result[1], Clusters.UnitTesting.Commands.TestBatchHelperResponse), "Unexpected return type for second InvokeRequest") + asserts.assert_equal(result[0].buffer, request_1_fill_character * response_size, + "Unexpected response to first InvokeRequest") + asserts.assert_equal(result[1].buffer, request_2_fill_character * response_size, + "Unexpected response to second InvokeRequest") + logging.info("DUT successfully responded to a InvokeRequest action with two valid commands") + + # TODO(#31434): After TestEventTrigger adds ability to force one response per InvokeResponseMessage + # we should be using that instead of relying on size of response_size. Right now we are relying on, + # the assumption that chip::app::kMaxSecureSduLengthBytes < 1300 bytes. + self.print_step(2, "Send batch commands with large expected response over multiple `InvokeResponseMessage`s") + response_size = 700 + endpoint = 1 + request_1_fill_character = b"a" + request_2_fill_character = b"b" + # Note that first request is actually delayed trying to get DUT to respond with values out of order + command = Clusters.UnitTesting.Commands.TestBatchHelperRequest( + sleepBeforeResponseTimeMs=50, sizeOfResponseBuffer=response_size, fillCharacter=ord(request_1_fill_character)) + invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) + command = Clusters.UnitTesting.Commands.TestSecondBatchHelperRequest( + sleepBeforeResponseTimeMs=0, sizeOfResponseBuffer=response_size, fillCharacter=ord(request_2_fill_character)) + invoke_request_2 = Clusters.Command.InvokeRequestInfo(endpoint, command) + try: + result = await dev_ctrl.SendBatchCommands(dut_node_id, [invoke_request_1, invoke_request_2]) + except InteractionModelError: + asserts.fail("DUT failed to successfully responded to a InvokeRequest action with two valid commands") + + asserts.assert_true(type_matches(result, list), "Unexpected return from SendBatchCommands") + asserts.assert_equal(len(result), 2, "Unexpected number of InvokeResponses sent back from DUT") + asserts.assert_true(type_matches( + result[0], Clusters.UnitTesting.Commands.TestBatchHelperResponse), "Unexpected return type for first InvokeRequest") + asserts.assert_true(type_matches( + result[1], Clusters.UnitTesting.Commands.TestBatchHelperResponse), "Unexpected return type for second InvokeRequest") + asserts.assert_equal(result[0].buffer, request_1_fill_character * response_size, + "Unexpected response to first InvokeRequest") + asserts.assert_equal(result[1].buffer, request_2_fill_character * response_size, + "Unexpected response to second InvokeRequest") + logging.info("DUT successfully responded to a InvokeRequest spread accross multiple InvokeResponseMessages") + + +if __name__ == "__main__": + default_matter_test_main() From b08e41c9bf7a6c8084ba5913d6c95d493d330341 Mon Sep 17 00:00:00 2001 From: Dieter Van der Meulen <87530904+dvdm-qorvo@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:59:43 +0100 Subject: [PATCH 17/45] [QPG] LIT ICD configuration for Switch Application (#31657) * Update ICD management cluster to become a LIT ICD device. * Updated ZAP configuration to match color dimmer switch device. --- .../qpg/include/CHIPProjectConfig.h | 6 + .../light-switch-app/qpg/zap/switch.matter | 420 +-- examples/light-switch-app/qpg/zap/switch.zap | 2573 +++++++++++++---- 3 files changed, 2171 insertions(+), 828 deletions(-) diff --git a/examples/light-switch-app/qpg/include/CHIPProjectConfig.h b/examples/light-switch-app/qpg/include/CHIPProjectConfig.h index 0cce04bad354c0..b6d7572839ec75 100644 --- a/examples/light-switch-app/qpg/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/qpg/include/CHIPProjectConfig.h @@ -119,3 +119,9 @@ #ifndef CHIP_DEVICE_CONFIG_THREAD_FTD #define CHIP_DEVICE_CONFIG_THREAD_FTD 0 #endif + +#define CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC 1800 +#define CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS 10000 +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS 5000 +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(5000) +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(500) diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 7f8430a3809b3c..74a9b6c9195de0 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -250,6 +250,131 @@ cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } +/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ +cluster LevelControl = 8 { + revision 5; + + enum MoveModeEnum : enum8 { + kUp = 0; + kDown = 1; + } + + enum StepModeEnum : enum8 { + kUp = 0; + kDown = 1; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + kLighting = 0x2; + kFrequency = 0x4; + } + + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + kCoupleColorTempToLevel = 0x2; + } + + readonly attribute nullable int8u currentLevel = 0; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; + attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; + attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToLevelRequest { + int8u level = 0; + nullable int16u transitionTime = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct MoveRequest { + MoveModeEnum moveMode = 0; + nullable int8u rate = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct StepRequest { + StepModeEnum stepMode = 0; + int8u stepSize = 1; + nullable int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct StopRequest { + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; + } + + request struct MoveToLevelWithOnOffRequest { + int8u level = 0; + nullable int16u transitionTime = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct MoveWithOnOffRequest { + MoveModeEnum moveMode = 0; + nullable int8u rate = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct StepWithOnOffRequest { + StepModeEnum stepMode = 0; + int8u stepSize = 1; + nullable int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; + } + + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ + command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ + command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ + command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1675,155 +1800,6 @@ cluster IcdManagement = 70 { command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster ScenesManagement = 98 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional nullable node_id lastConfiguredBy = 0; - readonly attribute int16u sceneTableSize = 1; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int32u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int32u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int32u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 64 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2154,16 +2130,14 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; } - server cluster Binding { - callback attribute binding; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AccessControl { emits event AccessControlEntryChanged; emits event AccessControlExtensionChanged; @@ -2172,6 +2146,9 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2186,7 +2163,7 @@ endpoint 0 { callback attribute vendorID; callback attribute productName; callback attribute productID; - persist attribute nodeLabel; + ram attribute nodeLabel; callback attribute location; callback attribute hardwareVersion; callback attribute hardwareVersionString; @@ -2197,11 +2174,15 @@ endpoint 0 { callback attribute productURL; callback attribute productLabel; callback attribute serialNumber; - persist attribute localConfigDisabled default = 0; + ram attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute specificationVersion; callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -2211,9 +2192,13 @@ endpoint 0 { emits event VersionApplied; emits event DownloadError; callback attribute defaultOTAProviders; - ram attribute updatePossible default = 1; + ram attribute updatePossible default = true; ram attribute updateState default = 0; ram attribute updateStateProgress default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2226,6 +2211,10 @@ endpoint 0 { callback attribute regulatoryConfig; callback attribute locationCapability; callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2246,6 +2235,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2260,6 +2253,10 @@ endpoint 0 { } server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2268,21 +2265,26 @@ endpoint 0 { } server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; emits event BootReason; callback attribute networkInterfaces; callback attribute rebootCount; callback attribute upTime; - callback attribute totalOperationalHours; callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; - callback attribute testEventTriggersEnabled default = false; + ram attribute testEventTriggersEnabled default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 0x0002; + ram attribute clusterRevision default = 2; handle command TestEventTrigger; - handle command TimeSnapshot; } server cluster SoftwareDiagnostics { @@ -2290,6 +2292,10 @@ endpoint 0 { callback attribute currentHeapFree; callback attribute currentHeapUsed; callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2357,6 +2363,10 @@ endpoint 0 { callback attribute channelPage0Mask; callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; @@ -2367,7 +2377,11 @@ endpoint 0 { callback attribute windowStatus; callback attribute adminFabricIndex; callback attribute adminVendorId; - ram attribute featureMap default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; handle command OpenCommissioningWindow; @@ -2382,6 +2396,10 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2404,6 +2422,10 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2417,12 +2439,20 @@ endpoint 0 { server cluster FixedLabel { callback attribute labelList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2431,21 +2461,41 @@ endpoint 0 { callback attribute idleModeDuration; callback attribute activeModeDuration; callback attribute activeModeThreshold; - ram attribute featureMap default = 0x0000; + callback attribute registeredClients; + callback attribute ICDCounter; + callback attribute clientsSupportedPerFabric; + ram attribute userActiveModeTriggerHint default = 0x100; + ram attribute userActiveModeTriggerInstruction default = "Reset the application"; + ram attribute operatingMode default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0007; ram attribute clusterRevision default = 2; + + handle command RegisterClient; + handle command RegisterClientResponse; + handle command UnregisterClient; + handle command StayActiveRequest; + handle command StayActiveResponse; } } endpoint 1 { - device type ma_onofflightswitch = 259, version 1; + device type ma_colordimmerswitch = 261, version 1; binding cluster Identify; + binding cluster Groups; binding cluster OnOff; - binding cluster ScenesManagement; + binding cluster LevelControl; binding cluster ColorControl; server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2454,28 +2504,14 @@ endpoint 1 { handle command TriggerEffect; } - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command AddGroup; - handle command AddGroupResponse; - handle command ViewGroup; - handle command ViewGroupResponse; - handle command GetGroupMembership; - handle command GetGroupMembershipResponse; - handle command RemoveGroup; - handle command RemoveGroupResponse; - handle command RemoveAllGroups; - handle command AddGroupIfIdentifying; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2483,6 +2519,10 @@ endpoint 1 { server cluster Binding { callback attribute binding; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2493,12 +2533,13 @@ endpoint 2 { server cluster Identify { ram attribute identifyTime default = 0x0; - ram attribute identifyType default = 0x0; + ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 4; handle command Identify; handle command TriggerEffect; @@ -2511,19 +2552,20 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; } server cluster Switch { - emits event InitialPress; ram attribute numberOfPositions default = 2; ram attribute currentPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; } } diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap index b646481b957d6b..929176cfe4e579 100644 --- a/examples/light-switch-app/qpg/zap/switch.zap +++ b/examples/light-switch-app/qpg/zap/switch.zap @@ -13,7 +13,7 @@ }, { "key": "manufacturerCodes", - "value": "0x1002" + "value": "0x10D0" } ], "package": [ @@ -133,27 +133,27 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -163,20 +163,26 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "Binding", - "code": 0, + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -213,10 +219,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -312,6 +318,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -398,8 +452,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -414,8 +468,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -430,8 +484,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -446,8 +500,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -462,8 +516,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -473,13 +527,13 @@ "side": "server", "type": "char_string", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -494,8 +548,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -510,8 +564,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -526,8 +580,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -542,8 +596,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -558,8 +612,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -572,10 +626,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -588,10 +642,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -604,10 +658,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -620,10 +674,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -636,10 +690,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -649,13 +703,13 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 1, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -668,10 +722,10 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -682,7 +736,7 @@ "type": "CapabilityMinimaStruct", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": null, "reportable": 1, @@ -722,6 +776,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -730,7 +848,7 @@ "type": "bitmap32", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "0", "reportable": 1, @@ -750,8 +868,8 @@ "bounded": 0, "defaultValue": "3", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ], @@ -829,6 +947,22 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -841,8 +975,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -875,7 +1009,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -891,10 +1025,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "true", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -909,8 +1043,8 @@ "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -930,35 +1064,99 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ], @@ -1056,8 +1254,8 @@ "bounded": 0, "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1072,8 +1270,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1124,6 +1322,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1152,8 +1414,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -1361,65 +1623,69 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + }, { - "name": "RetrieveLogsRequest", - "code": 0, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RetrieveLogsResponse", - "code": 1, + "name": "AttributeList", + "code": 65531, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1430,7 +1696,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1455,15 +1721,15 @@ ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "Diagnostic Logs", + "code": 50, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "DIAGNOSTIC_LOGS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "TestEventTrigger", + "name": "RetrieveLogsRequest", "code": 0, "mfgCode": null, "source": "client", @@ -1471,18 +1737,18 @@ "isEnabled": 1 }, { - "name": "TimeSnapshot", + "name": "RetrieveLogsResponse", "code": 1, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 } ], "attributes": [ { - "name": "NetworkInterfaces", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -1492,32 +1758,32 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RebootCount", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UpTime", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1529,11 +1795,11 @@ "reportableChange": 0 }, { - "name": "TotalOperationalHours", - "code": 3, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1545,25 +1811,61 @@ "reportableChange": 0 }, { - "name": "BootReason", - "code": 4, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "BootReasonEnum", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveHardwareFaults", - "code": 5, - "mfgCode": null, + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, "side": "server", "type": "array", "included": 1, @@ -1577,11 +1879,11 @@ "reportableChange": 0 }, { - "name": "ActiveRadioFaults", - "code": 6, + "name": "RebootCount", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1593,11 +1895,11 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", - "code": 7, + "name": "UpTime", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1609,85 +1911,88 @@ "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "BootReason", + "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ActiveHardwareFaults", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ActiveRadioFaults", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0002", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "BootReason", - "code": 3, + "name": "ActiveNetworkFaults", + "code": 7, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "ResetWatermarks", - "code": 0, + "name": "TestEventTriggersEnabled", + "code": 8, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "ThreadMetrics", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -1702,11 +2007,11 @@ "reportableChange": 0 }, { - "name": "CurrentHeapFree", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1718,11 +2023,11 @@ "reportableChange": 0 }, { - "name": "CurrentHeapUsed", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1734,19 +2039,19 @@ "reportableChange": 0 }, { - "name": "CurrentHeapHighWatermark", - "code": 3, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1756,10 +2061,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1775,24 +2080,54 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Thread Network Diagnostics", - "code": 53, + "name": "Software Diagnostics", + "code": 52, "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ResetCounts", + "name": "ResetWatermarks", "code": 0, "mfgCode": null, "source": "client", @@ -1802,120 +2137,120 @@ ], "attributes": [ { - "name": "Channel", + "name": "ThreadMetrics", "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RoutingRole", + "name": "CurrentHeapFree", "code": 1, "mfgCode": null, "side": "server", - "type": "RoutingRoleEnum", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NetworkName", + "name": "CurrentHeapUsed", "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PanId", + "name": "CurrentHeapHighWatermark", "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ExtendedPanId", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MeshLocalPrefix", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NeighborTable", - "code": 7, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -1925,9 +2260,189 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { "name": "RouteTable", @@ -1941,8 +2456,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1957,8 +2472,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1973,8 +2488,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -1989,8 +2504,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2005,8 +2520,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2021,8 +2536,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2035,10 +2550,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2051,10 +2566,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2067,10 +2582,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2083,10 +2598,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2099,10 +2614,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2115,10 +2630,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2131,10 +2646,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2147,10 +2662,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2163,10 +2678,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2179,10 +2694,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2195,10 +2710,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2211,10 +2726,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2227,10 +2742,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2243,10 +2758,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2259,10 +2774,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2275,10 +2790,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2291,10 +2806,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2307,10 +2822,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2323,10 +2838,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2339,10 +2854,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2355,10 +2870,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2371,10 +2886,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2387,10 +2902,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2403,10 +2918,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2419,10 +2934,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2435,10 +2950,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2451,10 +2966,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2467,10 +2982,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2483,10 +2998,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2499,10 +3014,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2515,10 +3030,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2531,10 +3046,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2547,10 +3062,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2563,10 +3078,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2579,10 +3094,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2595,10 +3110,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2611,10 +3126,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2627,10 +3142,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2643,10 +3158,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2659,10 +3174,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2675,10 +3190,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2691,10 +3206,10 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2709,8 +3224,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2725,8 +3240,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2741,8 +3256,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2757,8 +3272,72 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -2789,8 +3368,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -2877,6 +3456,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2887,7 +3530,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2905,8 +3548,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -3045,8 +3688,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3061,8 +3704,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3077,8 +3720,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3093,8 +3736,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3114,9 +3757,73 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, "side": "server", "type": "bitmap32", "included": 1, @@ -3141,8 +3848,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -3269,6 +3976,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3327,6 +4098,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3374,39 +4209,299 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClient", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UnregisterClient", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserActiveModeTriggerHint", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "UserActiveModeTriggerBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x100", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "UserActiveModeTriggerInstruction", + "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "Reset the application", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "OperatingMode", + "code": 8, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "OperatingModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3416,23 +4511,13 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "ICD Management", - "code": 70, - "mfgCode": null, - "define": "ICD_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "IdleModeDuration", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -3444,11 +4529,11 @@ "reportableChange": 0 }, { - "name": "ActiveModeDuration", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -3460,11 +4545,27 @@ "reportableChange": 0 }, { - "name": "ActiveModeThreshold", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -3485,7 +4586,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0007", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3507,35 +4608,44 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "OnTransitionToActiveMode", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] } ] }, { "id": 2, - "name": "MA-onofflightswitch", + "name": "MA-colordimmerswitch", "deviceTypeRef": { - "code": 259, + "code": 261, "profileId": 259, - "label": "MA-onofflightswitch", - "name": "MA-onofflightswitch" + "label": "MA-colordimmerswitch", + "name": "MA-colordimmerswitch" }, "deviceTypes": [ { - "code": 259, + "code": 261, "profileId": 259, - "label": "MA-onofflightswitch", - "name": "MA-onofflightswitch" + "label": "MA-colordimmerswitch", + "name": "MA-colordimmerswitch" } ], "deviceVersions": [ 1 ], "deviceIdentifiers": [ - 259 + 261 ], - "deviceTypeName": "MA-onofflightswitch", - "deviceTypeCode": 259, + "deviceTypeName": "MA-colordimmerswitch", + "deviceTypeCode": 261, "deviceTypeProfileId": 259, "clusters": [ { @@ -3545,7 +4655,41 @@ "define": "IDENTIFY_CLUSTER", "side": "client", "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3558,8 +4702,8 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -3600,10 +4744,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3616,7 +4760,55 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3666,8 +4858,8 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -3677,7 +4869,7 @@ "code": 4, "mfgCode": null, "define": "GROUPS_CLUSTER", - "side": "server", + "side": "client", "enabled": 1, "commands": [ { @@ -3685,7 +4877,7 @@ "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -3693,7 +4885,7 @@ "code": 0, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -3701,7 +4893,7 @@ "code": 1, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -3709,7 +4901,7 @@ "code": 1, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -3717,7 +4909,7 @@ "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -3725,7 +4917,7 @@ "code": 2, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -3733,7 +4925,7 @@ "code": 3, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -3741,7 +4933,7 @@ "code": 3, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -3749,7 +4941,7 @@ "code": 4, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -3757,32 +4949,16 @@ "code": 5, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 } ], "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "NameSupportBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", @@ -3798,7 +4974,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -3806,127 +4982,62 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] - }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ { - "name": "StoreScene", - "code": 4, + "name": "Off", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 0, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "On", + "code": 1, "mfgCode": null, "source": "client", "isIncoming": 0, "isEnabled": 1 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "Toggle", + "code": 2, "mfgCode": null, "source": "client", "isIncoming": 0, "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3937,25 +5048,25 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "client", "enabled": 1, "commands": [ { - "name": "Toggle", - "code": 2, + "name": "MoveToLevel", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 0, @@ -3963,6 +5074,22 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3975,8 +5102,8 @@ "bounded": 0, "defaultValue": "5", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -4053,6 +5180,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -4127,6 +5302,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4179,6 +5418,22 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -4191,8 +5446,8 @@ "bounded": 0, "defaultValue": "6", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -4278,7 +5533,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4316,6 +5571,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -4358,7 +5629,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4470,6 +5741,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -4592,6 +5879,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -4618,7 +5921,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4640,15 +5943,6 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "InitialPress", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - } ] } ] @@ -4663,7 +5957,7 @@ "networkId": 0 }, { - "endpointTypeName": "MA-onofflightswitch", + "endpointTypeName": "MA-colordimmerswitch", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, @@ -4676,5 +5970,6 @@ "endpointId": 2, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file From 4aa833d1c00bef0eadb4d065ac8ca4d11eca66d9 Mon Sep 17 00:00:00 2001 From: cdj <45139296+DejinChen@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:20:58 +0800 Subject: [PATCH 18/45] update mStagingNetwork to the dataset in NVS after thread panid changed (#31597) --- .../GenericNetworkCommissioningThreadDriver.cpp | 11 +++++++++++ .../GenericNetworkCommissioningThreadDriver.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index 0859c3f723d5d5..0a961a9f8e4afa 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -47,6 +47,7 @@ CHIP_ERROR GenericThreadDriver::Init(Internal::BaseDriver::NetworkStatusChangeCa { ThreadStackMgrImpl().SetNetworkStatusChangeCallback(statusChangeCallback); ThreadStackMgrImpl().GetThreadProvision(mStagingNetwork); + ReturnErrorOnFailure(PlatformMgr().AddEventHandler(OnThreadStateChangeHandler, reinterpret_cast(this))); // If the network configuration backup exists, it means that the device has been rebooted with // the fail-safe armed. Since OpenThread persists all operational dataset changes, the backup @@ -56,6 +57,16 @@ CHIP_ERROR GenericThreadDriver::Init(Internal::BaseDriver::NetworkStatusChangeCa return CHIP_NO_ERROR; } +void GenericThreadDriver::OnThreadStateChangeHandler(const ChipDeviceEvent * event, intptr_t arg) +{ + if ((event->Type == DeviceEventType::kThreadStateChange) && + (event->ThreadStateChange.OpenThread.Flags & OT_CHANGED_THREAD_PANID)) + { + // Update the mStagingNetwork when thread panid changed + ThreadStackMgrImpl().GetThreadProvision(reinterpret_cast(arg)->mStagingNetwork); + } +} + void GenericThreadDriver::Shutdown() { ThreadStackMgrImpl().SetNetworkStatusChangeCallback(nullptr); diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h index bbfec6a44ff879..28dc8f176ddd1f 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h @@ -116,6 +116,7 @@ class GenericThreadDriver final : public ThreadDriver private: uint8_t scanNetworkTimeoutSeconds; uint8_t connectNetworkTimeout; + static void OnThreadStateChangeHandler(const ChipDeviceEvent * event, intptr_t arg); Status MatchesNetworkId(const Thread::OperationalDataset & dataset, const ByteSpan & networkId) const; CHIP_ERROR BackupConfiguration(); From db82aaaa8900640f16071651680c40bab56172b0 Mon Sep 17 00:00:00 2001 From: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:45:54 -0300 Subject: [PATCH 19/45] Add python_env to chip-cert-bins image (#31664) --- integrations/docker/images/chip-cert-bins/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 9aec06c3387855..553b3d65718e16 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -30,16 +30,19 @@ RUN case ${TARGETPLATFORM} in \ # base build and check tools and libraries layer RUN set -x \ && apt-get update \ + && apt-get upgrade -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ autoconf \ automake \ bison \ + bluez \ bridge-utils \ clang \ clang-format \ clang-tidy \ curl \ flex \ + gcc \ g++ \ git \ gperf \ @@ -252,7 +255,7 @@ RUN case ${TARGETPLATFORM} in \ *) ;; \ esac -RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true +RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i out/python_env # Stage 3: Copy relevant cert bins to a minimal image to reduce size. FROM ubuntu:22.04 @@ -280,8 +283,9 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/lit-icd-app lit-icd-a COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-energy-management-app chip-energy-management-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-microwave-oven-app chip-microwave-oven-app -# Stage 3.1 Setup the Matter Python environment +# Stage 3.1: Setup the Matter Python environment COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_lib python_lib +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_env python_env COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing python_testing COPY --from=chip-build-cert-bins /root/connectedhomeip/scripts/tests/requirements.txt /tmp/requirements.txt From 42c44d544b059a8f0d9e3b86e9a1f6cc94cd0ea9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 24 Jan 2024 14:57:24 -0500 Subject: [PATCH 20/45] Fix handling of optional struct-typed command arguments in chip-tool. (#31658) AddArgument documents that for "complex" (i.e. list and struct) arguments there is no automatic type-based handling of optionality and the "kOptional" flag needs to be passed in explicitly. But the generated code was not doing that. --- examples/chip-tool/templates/commands.zapt | 2 +- .../zap-generated/cluster/Commands.h | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 37aaef24cc2678..bf981ec8e9e9bf 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -31,7 +31,7 @@ public: { {{#zcl_command_arguments}} {{#if_chip_complex}} - AddArgument("{{asUpperCamelCase label}}", &mComplex_{{asUpperCamelCase label}}); + AddArgument("{{asUpperCamelCase label}}", &mComplex_{{asUpperCamelCase label}}{{#if isOptional}}, "", Argument::kOptional{{/if}}); {{else if (isString type)}} AddArgument("{{asUpperCamelCase label}}", &mRequest.{{asLowerCamelCase label}}); {{else}} diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 854e51ce08f135..c4eb22e920597c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -11052,10 +11052,10 @@ class ChannelGetProgramGuide : public ClusterCommand { AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); - AddArgument("ChannelList", &mComplex_ChannelList); - AddArgument("PageToken", &mComplex_PageToken); + AddArgument("ChannelList", &mComplex_ChannelList, "", Argument::kOptional); + AddArgument("PageToken", &mComplex_PageToken, "", Argument::kOptional); AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); - AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("ExternalIDList", &mComplex_ExternalIDList, "", Argument::kOptional); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } @@ -12103,7 +12103,7 @@ class ContentLauncherLaunchContent : public ClusterCommand AddArgument("Search", &mComplex_Search); AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); AddArgument("Data", &mRequest.data); - AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences, "", Argument::kOptional); AddArgument("UseCurrentContext", 0, 1, &mRequest.useCurrentContext); ClusterCommand::AddArguments(); } @@ -12147,7 +12147,7 @@ class ContentLauncherLaunchURL : public ClusterCommand { AddArgument("ContentURL", &mRequest.contentURL); AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); + AddArgument("BrandingInformation", &mComplex_BrandingInformation, "", Argument::kOptional); ClusterCommand::AddArguments(); } @@ -12303,7 +12303,7 @@ class ApplicationLauncherLaunchApp : public ClusterCommand ApplicationLauncherLaunchApp(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("launch-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("Application", &mComplex_Application); + AddArgument("Application", &mComplex_Application, "", Argument::kOptional); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } @@ -12344,7 +12344,7 @@ class ApplicationLauncherStopApp : public ClusterCommand ApplicationLauncherStopApp(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("Application", &mComplex_Application); + AddArgument("Application", &mComplex_Application, "", Argument::kOptional); ClusterCommand::AddArguments(); } @@ -12384,7 +12384,7 @@ class ApplicationLauncherHideApp : public ClusterCommand ApplicationLauncherHideApp(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("hide-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("Application", &mComplex_Application); + AddArgument("Application", &mComplex_Application, "", Argument::kOptional); ClusterCommand::AddArguments(); } @@ -14032,11 +14032,11 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand AddArgument("OptionalString", &mRequest.optionalString); AddArgument("NullableOptionalString", &mRequest.nullableOptionalString); AddArgument("NullableStruct", &mComplex_NullableStruct); - AddArgument("OptionalStruct", &mComplex_OptionalStruct); - AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct); + AddArgument("OptionalStruct", &mComplex_OptionalStruct, "", Argument::kOptional); + AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct, "", Argument::kOptional); AddArgument("NullableList", &mComplex_NullableList); - AddArgument("OptionalList", &mComplex_OptionalList); - AddArgument("NullableOptionalList", &mComplex_NullableOptionalList); + AddArgument("OptionalList", &mComplex_OptionalList, "", Argument::kOptional); + AddArgument("NullableOptionalList", &mComplex_NullableOptionalList, "", Argument::kOptional); ClusterCommand::AddArguments(); } From 6a46dcd437fb4943ebdef5a1353f547e6a39831a Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 24 Jan 2024 15:54:20 -0500 Subject: [PATCH 21/45] Fix build break on Linux all clusters app (#31669) --- .../linux/diagnostic-logs-provider-delegate-impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp b/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp index 12636a9c0799f2..4dc94da1338c28 100644 --- a/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp +++ b/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp @@ -152,7 +152,7 @@ size_t LogProvider::GetSizeForIntent(IntentEnum intent) auto rv = fclose(fp); if (rv != 0) { - ChipLogError(NotSpecified, "Error when closing file pointer: %p (%d)", fp, errno); + ChipLogError(NotSpecified, "Error when closing file pointer (%d)", errno); } return fileSize; From f44eb6b1428990b50c7ecc00bee95f7f6f93be10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:20:15 -0500 Subject: [PATCH 22/45] Bump third_party/pigweed/repo from `9640cde` to `0380161` (#31589) * Bump third_party/pigweed/repo from `9640cde` to `0380161` Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `9640cde` to `0380161`. - [Commits](https://github.com/google/pigweed/compare/9640cdef100f87d7987875d3a418931d6500e5b2...0380161bd68c216a590230f0cc49d26add7eef8a) --- updated-dependencies: - dependency-name: third_party/pigweed/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Remove pw_hdlc::pw_rpc dependency * Remove bug report comment * Restyle * Add dependency to pw_hdlc:default_addresses * Add assert header to binary * Also update chef example * Restyle * Add a few more dependencies on default_addresses * restyle * add decoder header * Drop a few more rpc_packets includes and add default_addresses * Fix wrong dependency from copy&paster for efr32 test drives * Add another dependency for efr32 ... not sure why we have several copies of the same code :( --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin --- config/ameba/lib/pw_rpc/BUILD.gn | 1 - config/bouffalolab/common/lib/pw_rpc/BUILD.gn | 1 - config/efr32/lib/pw_rpc/BUILD.gn | 1 - config/esp32/lib/pw_rpc/BUILD.gn | 1 - config/linux/lib/pw_rpc/BUILD.gn | 1 - config/mbed/chip-gn/lib/pw_rpc/BUILD.gn | 1 - config/qpg/lib/pw_rpc/BUILD.gn | 1 - examples/chef/linux/BUILD.gn | 2 +- examples/chef/nrfconnect/CMakeLists.txt | 1 - examples/chef/silabs/BUILD.gn | 1 + examples/chef/telink/CMakeLists.txt | 1 - examples/common/pigweed/BUILD.gn | 2 +- examples/common/pigweed/RpcService.cpp | 23 +++++++++++++++++-- examples/common/pigweed/mbed/Rpc.cpp | 1 - examples/common/pigweed/system_rpc_server.cc | 3 ++- examples/energy-management-app/linux/BUILD.gn | 2 +- examples/light-switch-app/qpg/BUILD.gn | 1 + examples/light-switch-app/silabs/BUILD.gn | 1 + .../light-switch-app/telink/CMakeLists.txt | 1 - .../lighting-app/bouffalolab/bl602/BUILD.gn | 1 + .../lighting-app/bouffalolab/bl702/BUILD.gn | 1 + .../lighting-app/bouffalolab/bl702l/BUILD.gn | 1 + examples/lighting-app/linux/BUILD.gn | 2 +- .../lighting-app/nrfconnect/CMakeLists.txt | 1 - examples/lighting-app/qpg/BUILD.gn | 1 + examples/lighting-app/silabs/BUILD.gn | 1 + examples/lighting-app/telink/CMakeLists.txt | 1 - examples/lit-icd-app/silabs/BUILD.gn | 1 + examples/lock-app/qpg/BUILD.gn | 1 + examples/lock-app/silabs/BUILD.gn | 1 + examples/platform/linux/system_rpc_server.cc | 3 ++- examples/platform/mbed/util/PigweedLogger.cpp | 1 + examples/pump-app/silabs/BUILD.gn | 1 + examples/smoke-co-alarm-app/silabs/BUILD.gn | 1 + examples/thermostat/qpg/BUILD.gn | 1 + examples/thermostat/silabs/BUILD.gn | 1 + third_party/pigweed/repo | 2 +- 37 files changed, 46 insertions(+), 22 deletions(-) diff --git a/config/ameba/lib/pw_rpc/BUILD.gn b/config/ameba/lib/pw_rpc/BUILD.gn index 4b47ab1d61a16a..0b125c8a98aada 100644 --- a/config/ameba/lib/pw_rpc/BUILD.gn +++ b/config/ameba/lib/pw_rpc/BUILD.gn @@ -24,7 +24,6 @@ static_library("pw_rpc") { "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", "${chip_root}/examples/platform/ameba/pw_sys_io:pw_sys_io_ameba", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_hdlc, dir_pw_log, diff --git a/config/bouffalolab/common/lib/pw_rpc/BUILD.gn b/config/bouffalolab/common/lib/pw_rpc/BUILD.gn index b1c9e1a596209e..999ffe37618ec7 100644 --- a/config/bouffalolab/common/lib/pw_rpc/BUILD.gn +++ b/config/bouffalolab/common/lib/pw_rpc/BUILD.gn @@ -36,7 +36,6 @@ static_library("pw_rpc") { "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", "${chip_root}/examples/platform/bouffalolab/common/rpc/pw_sys_io:pw_sys_io", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_checksum, dir_pw_hdlc, diff --git a/config/efr32/lib/pw_rpc/BUILD.gn b/config/efr32/lib/pw_rpc/BUILD.gn index ed2e3a47bc1305..f858f6c1321999 100644 --- a/config/efr32/lib/pw_rpc/BUILD.gn +++ b/config/efr32/lib/pw_rpc/BUILD.gn @@ -25,7 +25,6 @@ static_library("pw_rpc") { "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_checksum, dir_pw_hdlc, diff --git a/config/esp32/lib/pw_rpc/BUILD.gn b/config/esp32/lib/pw_rpc/BUILD.gn index 383e4b25f21d56..2ced13e5c5574d 100644 --- a/config/esp32/lib/pw_rpc/BUILD.gn +++ b/config/esp32/lib/pw_rpc/BUILD.gn @@ -24,7 +24,6 @@ static_library("pw_rpc") { "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", "${chip_root}/examples/platform/esp32/pw_sys_io:pw_sys_io_esp32", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_hdlc, dir_pw_log, diff --git a/config/linux/lib/pw_rpc/BUILD.gn b/config/linux/lib/pw_rpc/BUILD.gn index e79af448d13e57..a01627c32541d1 100644 --- a/config/linux/lib/pw_rpc/BUILD.gn +++ b/config/linux/lib/pw_rpc/BUILD.gn @@ -22,7 +22,6 @@ static_library("pw_rpc") { public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ] deps = [ "$dir_pw_hdlc:encoder", - "$dir_pw_hdlc:pw_rpc", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_rpc/system_server:facade", "$dir_pw_stream:socket_stream", diff --git a/config/mbed/chip-gn/lib/pw_rpc/BUILD.gn b/config/mbed/chip-gn/lib/pw_rpc/BUILD.gn index f1a5e071e9c619..c84adde4fb1e46 100644 --- a/config/mbed/chip-gn/lib/pw_rpc/BUILD.gn +++ b/config/mbed/chip-gn/lib/pw_rpc/BUILD.gn @@ -30,7 +30,6 @@ static_library("pw_rpc") { deps = [ "$dir_pw_rpc:server", "${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_hdlc, dir_pw_log, diff --git a/config/qpg/lib/pw_rpc/BUILD.gn b/config/qpg/lib/pw_rpc/BUILD.gn index bd633d591b3577..99c64201f5df19 100644 --- a/config/qpg/lib/pw_rpc/BUILD.gn +++ b/config/qpg/lib/pw_rpc/BUILD.gn @@ -36,7 +36,6 @@ static_library("pw_rpc") { "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", "${chip_root}/examples/platform/qpg/pw_sys_io:pw_sys_io_qpg", - "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_checksum, dir_pw_hdlc, diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index d3cf534a01ba75..fa12a79a91a09f 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -82,7 +82,7 @@ executable("${sample_name}") { ] deps += [ - "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index b0b69815246c10..1d9ab2fb436a62 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -214,7 +214,6 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc - pw_hdlc.pw_rpc pw_log pw_rpc.server pw_sys_io diff --git a/examples/chef/silabs/BUILD.gn b/examples/chef/silabs/BUILD.gn index cecef1c71bc050..3f74106f9f54c2 100644 --- a/examples/chef/silabs/BUILD.gn +++ b/examples/chef/silabs/BUILD.gn @@ -120,6 +120,7 @@ silabs_executable("chef_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "$dir_pw_trace", diff --git a/examples/chef/telink/CMakeLists.txt b/examples/chef/telink/CMakeLists.txt index 5d30d424ea3dfd..71f0c549e6ed79 100755 --- a/examples/chef/telink/CMakeLists.txt +++ b/examples/chef/telink/CMakeLists.txt @@ -231,7 +231,6 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc - pw_hdlc.pw_rpc pw_log pw_rpc.server pw_sys_io diff --git a/examples/common/pigweed/BUILD.gn b/examples/common/pigweed/BUILD.gn index 389c3fbc242951..d190b07fd85082 100644 --- a/examples/common/pigweed/BUILD.gn +++ b/examples/common/pigweed/BUILD.gn @@ -115,7 +115,7 @@ pw_source_set("system_rpc_server") { ] public_deps = [ - "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", ] diff --git a/examples/common/pigweed/RpcService.cpp b/examples/common/pigweed/RpcService.cpp index e36ab54afe1eb4..74d0b891e9b00d 100644 --- a/examples/common/pigweed/RpcService.cpp +++ b/examples/common/pigweed/RpcService.cpp @@ -22,8 +22,9 @@ #include #include +#include "pw_hdlc/decoder.h" +#include "pw_hdlc/default_addresses.h" #include "pw_hdlc/rpc_channel.h" -#include "pw_hdlc/rpc_packets.h" #include "pw_log/log.h" #include "pw_rpc/channel.h" #include "pw_status/status.h" @@ -116,7 +117,25 @@ void Start(void (*RegisterServices)(pw::rpc::Server &), ::chip::rpc::Mutex * uar std::array input_buffer; Logging::Log(Logging::kLogModule_NotSpecified, Logging::kLogCategory_Detail, "Starting pw_rpc server"); - pw::hdlc::ReadAndProcessPackets(server, input_buffer); + + pw::hdlc::Decoder decoder(input_buffer); + while (true) + { + std::byte data; + if (!pw::sys_io::ReadByte(&data).ok()) + { + // TODO: should we log? + return; + } + if (auto result = decoder.Process(data); result.ok()) + { + pw::hdlc::Frame & frame = result.value(); + if (frame.address() == pw::hdlc::kDefaultRpcAddress) + { + server.ProcessPacket(frame.data()).IgnoreError(); + } + } + } } } // namespace rpc diff --git a/examples/common/pigweed/mbed/Rpc.cpp b/examples/common/pigweed/mbed/Rpc.cpp index 79940b005eba06..2695822363d4ad 100644 --- a/examples/common/pigweed/mbed/Rpc.cpp +++ b/examples/common/pigweed/mbed/Rpc.cpp @@ -22,7 +22,6 @@ #include "pigweed/RpcService.h" #include "pw_hdlc/rpc_channel.h" -#include "pw_hdlc/rpc_packets.h" #include "pw_rpc/server.h" #include "pw_stream/sys_io_stream.h" #include "pw_sys_io/sys_io.h" diff --git a/examples/common/pigweed/system_rpc_server.cc b/examples/common/pigweed/system_rpc_server.cc index 6778499c54ab3c..098aa3b1711058 100644 --- a/examples/common/pigweed/system_rpc_server.cc +++ b/examples/common/pigweed/system_rpc_server.cc @@ -17,8 +17,9 @@ #include +#include "pw_hdlc/decoder.h" +#include "pw_hdlc/default_addresses.h" #include "pw_hdlc/rpc_channel.h" -#include "pw_hdlc/rpc_packets.h" #include "pw_log/log.h" #include "pw_rpc_system_server/rpc_server.h" #include "pw_stream/sys_io_stream.h" diff --git a/examples/energy-management-app/linux/BUILD.gn b/examples/energy-management-app/linux/BUILD.gn index 7504d51c242c98..11919a4e8c12a3 100644 --- a/examples/energy-management-app/linux/BUILD.gn +++ b/examples/energy-management-app/linux/BUILD.gn @@ -86,7 +86,7 @@ executable("chip-energy-management-app") { ] deps += [ - "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", diff --git a/examples/light-switch-app/qpg/BUILD.gn b/examples/light-switch-app/qpg/BUILD.gn index a5488d27b33dbc..659f2d4ab1efd3 100644 --- a/examples/light-switch-app/qpg/BUILD.gn +++ b/examples/light-switch-app/qpg/BUILD.gn @@ -102,6 +102,7 @@ qpg_executable("light_switch_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", diff --git a/examples/light-switch-app/silabs/BUILD.gn b/examples/light-switch-app/silabs/BUILD.gn index fc52c0b96b03b7..f302a1593facce 100644 --- a/examples/light-switch-app/silabs/BUILD.gn +++ b/examples/light-switch-app/silabs/BUILD.gn @@ -157,6 +157,7 @@ silabs_executable("light_switch_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", diff --git a/examples/light-switch-app/telink/CMakeLists.txt b/examples/light-switch-app/telink/CMakeLists.txt index 5dd8720ce8d59f..451727b9fe20ae 100755 --- a/examples/light-switch-app/telink/CMakeLists.txt +++ b/examples/light-switch-app/telink/CMakeLists.txt @@ -235,7 +235,6 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc - pw_hdlc.pw_rpc pw_log pw_rpc.server pw_sys_io diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index b24c8731b08efe..ab89ae3f3bdb63 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -182,6 +182,7 @@ bouffalolab_executable("lighting_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_kvs:crc16", "$dir_pw_log", diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index fa863ceaf699d3..f923e3bad6ffe9 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -252,6 +252,7 @@ bouffalolab_executable("lighting_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", diff --git a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn index b3e6f809b6ba38..24fad9ffa1897d 100644 --- a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn @@ -214,6 +214,7 @@ bouffalolab_executable("lighting_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", diff --git a/examples/lighting-app/linux/BUILD.gn b/examples/lighting-app/linux/BUILD.gn index aac02352bacf40..47b2b7e34cd48a 100644 --- a/examples/lighting-app/linux/BUILD.gn +++ b/examples/lighting-app/linux/BUILD.gn @@ -77,7 +77,7 @@ executable("chip-lighting-app") { ] deps += [ - "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index a4480b43f0afc6..04dacfac4af308 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -218,7 +218,6 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc - pw_hdlc.pw_rpc pw_log pw_rpc.server pw_sys_io diff --git a/examples/lighting-app/qpg/BUILD.gn b/examples/lighting-app/qpg/BUILD.gn index 981e7405150cb5..d8f86311d627eb 100644 --- a/examples/lighting-app/qpg/BUILD.gn +++ b/examples/lighting-app/qpg/BUILD.gn @@ -105,6 +105,7 @@ qpg_executable("lighting_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", diff --git a/examples/lighting-app/silabs/BUILD.gn b/examples/lighting-app/silabs/BUILD.gn index 9c314b025f63fd..4ca705caac2cef 100644 --- a/examples/lighting-app/silabs/BUILD.gn +++ b/examples/lighting-app/silabs/BUILD.gn @@ -173,6 +173,7 @@ silabs_executable("lighting_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "$dir_pw_trace", diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 2017d797558eb6..9620a00e1127e5 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -268,7 +268,6 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc - pw_hdlc.pw_rpc pw_log pw_rpc.server pw_sys_io diff --git a/examples/lit-icd-app/silabs/BUILD.gn b/examples/lit-icd-app/silabs/BUILD.gn index d547ddec637678..d0956cc9a7a2e3 100644 --- a/examples/lit-icd-app/silabs/BUILD.gn +++ b/examples/lit-icd-app/silabs/BUILD.gn @@ -156,6 +156,7 @@ silabs_executable("lit_icd_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", diff --git a/examples/lock-app/qpg/BUILD.gn b/examples/lock-app/qpg/BUILD.gn index 1023e9f2751ce2..2426fa7c3179d5 100644 --- a/examples/lock-app/qpg/BUILD.gn +++ b/examples/lock-app/qpg/BUILD.gn @@ -102,6 +102,7 @@ qpg_executable("lock_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", diff --git a/examples/lock-app/silabs/BUILD.gn b/examples/lock-app/silabs/BUILD.gn index f5d00f7d48ab63..fe2abc95512c20 100644 --- a/examples/lock-app/silabs/BUILD.gn +++ b/examples/lock-app/silabs/BUILD.gn @@ -157,6 +157,7 @@ silabs_executable("lock_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", diff --git a/examples/platform/linux/system_rpc_server.cc b/examples/platform/linux/system_rpc_server.cc index fc44cb30478ee0..c4e45be56360a6 100644 --- a/examples/platform/linux/system_rpc_server.cc +++ b/examples/platform/linux/system_rpc_server.cc @@ -25,8 +25,9 @@ #include #include "pw_assert/check.h" +#include "pw_hdlc/decoder.h" +#include "pw_hdlc/default_addresses.h" #include "pw_hdlc/rpc_channel.h" -#include "pw_hdlc/rpc_packets.h" #include "pw_log/log.h" #include "pw_rpc_system_server/rpc_server.h" #include "pw_stream/socket_stream.h" diff --git a/examples/platform/mbed/util/PigweedLogger.cpp b/examples/platform/mbed/util/PigweedLogger.cpp index 1fefd2d614afba..d1c9afbbf0c435 100644 --- a/examples/platform/mbed/util/PigweedLogger.cpp +++ b/examples/platform/mbed/util/PigweedLogger.cpp @@ -28,6 +28,7 @@ #include #include +#include #include namespace PigweedLogger { diff --git a/examples/pump-app/silabs/BUILD.gn b/examples/pump-app/silabs/BUILD.gn index f255000ea525d5..9b577950023bc0 100644 --- a/examples/pump-app/silabs/BUILD.gn +++ b/examples/pump-app/silabs/BUILD.gn @@ -171,6 +171,7 @@ silabs_executable("pump_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "$dir_pw_trace", diff --git a/examples/smoke-co-alarm-app/silabs/BUILD.gn b/examples/smoke-co-alarm-app/silabs/BUILD.gn index 7750dc31f6324b..73b015ea232822 100644 --- a/examples/smoke-co-alarm-app/silabs/BUILD.gn +++ b/examples/smoke-co-alarm-app/silabs/BUILD.gn @@ -173,6 +173,7 @@ silabs_executable("smoke_co_alarm_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", diff --git a/examples/thermostat/qpg/BUILD.gn b/examples/thermostat/qpg/BUILD.gn index 4c82da60be8be9..d4285571114721 100644 --- a/examples/thermostat/qpg/BUILD.gn +++ b/examples/thermostat/qpg/BUILD.gn @@ -101,6 +101,7 @@ qpg_executable("thermostat") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", diff --git a/examples/thermostat/silabs/BUILD.gn b/examples/thermostat/silabs/BUILD.gn index f82bbc40776c40..bb094b894f8db3 100644 --- a/examples/thermostat/silabs/BUILD.gn +++ b/examples/thermostat/silabs/BUILD.gn @@ -185,6 +185,7 @@ silabs_executable("thermostat_app") { ] deps += [ + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_stream:sys_io_stream", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 9640cdef100f87..0380161bd68c21 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 9640cdef100f87d7987875d3a418931d6500e5b2 +Subproject commit 0380161bd68c216a590230f0cc49d26add7eef8a From 57898b96790726cc8004d5e477ccf629e8ced5fb Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 24 Jan 2024 22:34:01 +0100 Subject: [PATCH 23/45] [darwin] Add support for downloading diagnostic logs (#31638) * [Matter.framework] Add MTRDiagnosticLogsDelegate to the Matter.framework * [darwin-framework-tool] Add bdx commands to darwin-framework-tool --- examples/darwin-framework-tool/BUILD.gn | 2 + .../commands/bdx/Commands.h | 32 + .../commands/bdx/DownloadLogCommand.h | 45 ++ .../commands/bdx/DownloadLogCommand.mm | 58 ++ examples/darwin-framework-tool/main.mm | 2 + src/darwin/Framework/CHIP/MTRDevice.h | 21 + src/darwin/Framework/CHIP/MTRDevice.mm | 12 + .../Framework/CHIP/MTRDeviceController.mm | 14 + .../CHIP/MTRDeviceControllerFactory.mm | 32 + .../MTRDeviceControllerFactory_Internal.h | 11 + .../CHIP/MTRDeviceController_Internal.h | 10 + .../CHIP/MTRDiagnosticLogsDownloader.h | 42 ++ .../CHIP/MTRDiagnosticLogsDownloader.mm | 630 ++++++++++++++++++ .../Framework/CHIP/MTRDiagnosticLogsType.h | 27 + src/darwin/Framework/CHIP/Matter.h | 1 + .../Matter.xcodeproj/project.pbxproj | 32 + 16 files changed, 971 insertions(+) create mode 100644 examples/darwin-framework-tool/commands/bdx/Commands.h create mode 100644 examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h create mode 100644 examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm create mode 100644 src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h create mode 100644 src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm create mode 100644 src/darwin/Framework/CHIP/MTRDiagnosticLogsType.h diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 7ee396dd04e24a..1973c64a889e20 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -163,6 +163,8 @@ executable("darwin-framework-tool") { "${chip_root}/examples/chip-tool/commands/common/Commands.h", "${chip_root}/examples/chip-tool/commands/common/HexConversion.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", + "commands/bdx/Commands.h", + "commands/bdx/DownloadLogCommand.mm", "commands/clusters/ClusterCommandBridge.h", "commands/clusters/ModelCommandBridge.mm", "commands/clusters/ReportCommandBridge.h", diff --git a/examples/darwin-framework-tool/commands/bdx/Commands.h b/examples/darwin-framework-tool/commands/bdx/Commands.h new file mode 100644 index 00000000000000..126ea055d03ba9 --- /dev/null +++ b/examples/darwin-framework-tool/commands/bdx/Commands.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "commands/bdx/DownloadLogCommand.h" +#include "commands/common/Commands.h" + +void registerCommandsBdx(Commands & commands) +{ + const char * clusterName = "Bdx"; + commands_list clusterCommands = { + make_unique(), // + }; + + commands.RegisterCommandSet(clusterName, clusterCommands, "Commands related to BDX"); +} diff --git a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h new file mode 100644 index 00000000000000..ce48270d28b6ac --- /dev/null +++ b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "../common/CHIPCommandBridge.h" + +class DownloadLogCommand : public CHIPCommandBridge +{ +public: + DownloadLogCommand() : CHIPCommandBridge("download") + { + AddArgument("node-id", 0, UINT64_MAX, &mNodeId, "Node to download the logs from."); + AddArgument("log-type", 0, 2, &mLogType, + "The type of log being requested. This should correspond to a value in the enum MTRDiagnosticLogType."); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout, + "The timeout for getting the log. If the timeout expires, completion will be called with whatever has been " + "retrieved by that point (which might be none or a partial log). If the timeout is set to 0, the request will " + "not expire and completion will not be called until the log is fully retrieved or an error occurs."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); } + +private: + chip::NodeId mNodeId; + uint8_t mLogType; + uint16_t mTimeout; +}; diff --git a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm new file mode 100644 index 00000000000000..494ec964f14b63 --- /dev/null +++ b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import + +#import "MTRError_Utils.h" + +#include "DownloadLogCommand.h" + +CHIP_ERROR DownloadLogCommand::RunCommand() +{ + ChipLogProgress(chipTool, "Downloading logs from node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); + + MTRDeviceController * commissioner = CurrentCommissioner(); + auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + + auto logType = static_cast(mLogType); + auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL); + + auto * self = this; + auto completion = ^(NSURL * url, NSError * error) { + // A non-nil url indicates the presence of content, which can occur even in error scenarios like timeouts. + if (nil != url) { + NSError * readError = nil; + auto * data = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&readError]; + VerifyOrReturn(nil == readError, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(readError))); + + auto * content = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"Content: %@", content); + } + + VerifyOrReturn(nil == error, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error))); + + // The url is nil when there are no logs on the target device. + if (nil == url) { + NSLog(@"No logs has been found onto node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); + } + self->SetCommandExitStatus(CHIP_NO_ERROR); + }; + + [device downloadLogOfType:logType timeout:mTimeout queue:queue completion:completion]; + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 8c96d490dc5ed8..070ae3188407d4 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -20,6 +20,7 @@ #import "logging/logging.h" +#include "commands/bdx/Commands.h" #include "commands/common/Commands.h" #include "commands/delay/Commands.h" #include "commands/discover/Commands.h" @@ -38,6 +39,7 @@ int main(int argc, const char * argv[]) dft::logging::Setup(); Commands commands; + registerCommandsBdx(commands); registerCommandsPairing(commands); registerCommandsDelay(commands); registerCommandsDiscover(commands); diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 4627b96beab62d..32a4593a2e40fc 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -18,6 +18,7 @@ #import #import #import +#import NS_ASSUME_NONNULL_BEGIN @@ -325,6 +326,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID MTR_UNSTABLE_API; +/** + * Download log of the desired type from the device. + * + * Note: The consumer of this API should move the file that the url points to or open it for reading before the + * completion handler returns. Otherwise, the file will be deleted, and the data will be lost. + * + * @param type The type of log being requested. This should correspond to a value in the enum MTRDiagnosticLogType. + * @param timeout The timeout for getting the log. If the timeout expires, completion will be called with whatever + * has been retrieved by that point (which might be none or a partial log). + * If the timeout is set to 0, the request will not expire and completion will not be called until + * the log is fully retrieved or an error occurs. + * @param queue The queue on which completion will be called. + * @param completion The completion that will be called to return the URL of the requested log if successful. Otherwise + * returns an error. + */ +- (void)downloadLogOfType:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; @end @protocol MTRDeviceDelegate diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 909fe065ac39ac..f25ac5b9564187 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -1363,6 +1363,18 @@ - (void)openCommissioningWindowWithDiscriminator:(NSNumber *)discriminator [baseDevice openCommissioningWindowWithDiscriminator:discriminator duration:duration queue:queue completion:completion]; } +- (void)downloadLogOfType:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion +{ + [_deviceController downloadLogFromNodeWithID:_nodeID + type:type + timeout:timeout + queue:queue + completion:completion]; +} + #pragma mark - Cache management // assume lock is held diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 836ea101ff8b1d..decd879a657ef3 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -1216,6 +1216,20 @@ - (void)operationalInstanceAdded:(chip::NodeId)nodeID [device nodeMayBeAdvertisingOperational]; } +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion +{ + [_factory downloadLogFromNodeWithID:nodeID + controller:self + type:type + timeout:timeout + queue:queue + completion:completion]; +} + @end /** diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 717679e233a3be..319c33fdac999e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -31,6 +31,7 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRDeviceController_Internal.h" +#import "MTRDiagnosticLogsDownloader.h" #import "MTRError_Internal.h" #import "MTRFabricInfo_Internal.h" #import "MTRFramework.h" @@ -133,6 +134,8 @@ @interface MTRDeviceControllerFactory () @property (nonatomic, readonly, nullable) id otaProviderDelegate; @property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; +@property (nonatomic, readonly) MTRDiagnosticLogsDownloader * diagnosticLogsDownloader; + - (BOOL)findMatchingFabric:(FabricTable &)fabricTable params:(MTRDeviceControllerStartupParams *)params fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; @@ -332,6 +335,8 @@ - (void)cleanupStartupObjects delete _persistentStorageDelegate; _persistentStorageDelegate = nullptr; } + + _diagnosticLogsDownloader = nil; } - (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable @@ -1066,6 +1071,33 @@ - (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricI return [self runningControllerForFabricIndex:fabricIndex includeControllerStartingUp:YES includeControllerShuttingDown:YES]; } +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion +{ + dispatch_sync(_chipWorkQueue, ^{ + if (![self isRunning]) { + return; + } + + if (_diagnosticLogsDownloader == nil) { + _diagnosticLogsDownloader = [[MTRDiagnosticLogsDownloader alloc] init]; + auto systemState = _controllerFactory->GetSystemState(); + systemState->BDXTransferServer()->SetDelegate([_diagnosticLogsDownloader getBridge]); + } + + [_diagnosticLogsDownloader downloadLogFromNodeWithID:nodeID + controller:controller + type:type + timeout:timeout + queue:queue + completion:completion]; + }); +} + - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 72827d10131d89..e41300127be59e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -22,6 +22,7 @@ #import #import #import +#import #if MTR_PER_CONTROLLER_STORAGE_ENABLED #import @@ -75,6 +76,16 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID; +/** + * Download log of the desired type from the device. + */ +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + /** * Initialize an MTRDeviceController with the given parameters. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 6bc64e03d8594a..92873cf4016b9e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -33,6 +33,7 @@ #import #import +#import #if MTR_PER_CONTROLLER_STORAGE_ENABLED #import #else @@ -233,6 +234,15 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)operationalInstanceAdded:(chip::NodeId)nodeID; +/** + * Download log of the desired type from the device. + */ +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + #pragma mark - Device-specific data and SDK access // DeviceController will act as a central repository for this opaque dictionary that MTRDevice manages - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID; diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h new file mode 100644 index 00000000000000..f10fea520fb4fb --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h @@ -0,0 +1,42 @@ +/** + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import +#import + +namespace chip { +namespace bdx { + class BDXTransferServerDelegate; +} +} + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRDiagnosticLogsDownloader : NSObject +- (chip::bdx::BDXTransferServerDelegate *)getBridge; + +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm new file mode 100644 index 00000000000000..4814b37d7a82f4 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm @@ -0,0 +1,630 @@ +/** + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTRDiagnosticLogsDownloader.h" + +#include + +#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRDeviceController_Internal.h" +#import "MTRError_Internal.h" +#import "MTRLogging_Internal.h" +#import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" + +#import "zap-generated/MTRClusters.h" + +typedef void (^AbortHandler)(NSError * error); + +static NSString * const kErrorInitDiagnosticLogsDownloader = @"Init failure while initializing Diagnostic Logs bridge."; +static NSString * const kEndUserSupport = @"EndUserSupport"; +static NSString * const kNetworkDiagnostics = @"NetworkDiagnostics"; +static NSString * const kCrash = @"Crash"; + +constexpr uint8_t kDiagnosticLogsEndPoint = 0; + +class DiagnosticLogsDownloaderBridge; + +NS_ASSUME_NONNULL_BEGIN + +@interface Download : NSObject +@property (nonatomic) NSString * fileDesignator; +@property (nonatomic) NSNumber * fabricIndex; +@property (nonatomic) NSNumber * nodeID; +@property (nonatomic) NSURL * fileURL; +@property (nonatomic) NSFileHandle * fileHandle; +@property (nonatomic) AbortHandler abortHandler; +@property (nonatomic) MTRStatusCompletion finalize; + +- (instancetype)initWithType:(MTRDiagnosticLogType)type + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion + done:(void (^)(Download * finishedDownload))done; + +- (void)writeToFile:(NSData *)data error:(out NSError **)error; + +- (BOOL)compare:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID; + +- (void)checkInteractionModelResponse:(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable)response error:(NSError * _Nullable)error; + +- (void)success; +- (void)failure:(NSError * _Nullable)error; +@end + +@interface Downloads : NSObject +@property (nonatomic, strong) NSMutableArray * downloads; + +- (Download * _Nullable)get:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID; + +- (Download * _Nullable)add:(MTRDiagnosticLogType)type + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion + done:(void (^)(Download * finishedDownload))done; +@end + +@interface MTRDiagnosticLogsDownloader () +@property (readonly) DiagnosticLogsDownloaderBridge * bridge; +@property (nonatomic, strong) Downloads * downloads; + +/** + * Notify the delegate when a BDX Session starts for some logs. + * + * If completion is passed a non-nil error, that will be converted into + * an error response to the BDX initiatior. Otherwise a success response will be sent. + */ +- (void)handleBDXTransferSessionBeginForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + completion:(MTRStatusCompletion)completion + abortHandler:(AbortHandler)abortHandler; + +/** + * Notify the delegate when some data is received on the BDX Session. + * + * If completion is passed a non-nil error, that will be converted into + * an error response to the sender. Otherwise a success response will be sent. + */ +- (void)handleBDXTransferSessionDataForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + data:(NSData *)data + completion:(MTRStatusCompletion)completion; + +/** + * Notify the delegate when a BDX Session ends for some logs. + */ +- (void)handleBDXTransferSessionEndForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + error:(NSError * _Nullable)error; + +@end + +NS_ASSUME_NONNULL_END + +class DiagnosticLogsDownloaderBridge : public chip::bdx::BDXTransferServerDelegate { +public: + DiagnosticLogsDownloaderBridge(MTRDiagnosticLogsDownloader * delegate); + ~DiagnosticLogsDownloaderBridge(); + + /////////// BDXTransferServerDelegate Interface ///////// + CHIP_ERROR OnTransferBegin(chip::bdx::BDXTransferProxy * transfer) override; + CHIP_ERROR OnTransferEnd(chip::bdx::BDXTransferProxy * transfer, CHIP_ERROR error) override; + CHIP_ERROR OnTransferData(chip::bdx::BDXTransferProxy * transfer, const chip::ByteSpan & data) override; + + CHIP_ERROR StartBDXTransferTimeout(Download * download, uint16_t timeoutInSeconds); + void CancelBDXTransferTimeout(Download * download); + +private: + static void OnTransferTimeout(chip::System::Layer * layer, void * context); + MTRDiagnosticLogsDownloader * mDelegate; + AbortHandler mAbortHandler; +}; + +@implementation Download +- (instancetype)initWithType:(MTRDiagnosticLogType)type + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion + done:(void (^)(Download * finishedDownload))done; +{ + self = [super init]; + if (self) { + auto * fileDesignator = [self _toFileDesignatorString:type nodeID:nodeID]; + auto * fileURL = [self _toFileURL:type nodeID:nodeID]; + + __weak typeof(self) weakSelf = self; + auto bdxTransferDone = ^(NSError * bdxError) { + dispatch_async(queue, ^{ + Download * strongSelf = weakSelf; + if (strongSelf) { + // If a fileHandle exists, it means that the BDX session has been initiated and a file has + // been created to host the data of the session. So even if there is an error it may be some + // data in the logs that the caller may find useful. For this reason, fileURL is passed in even + // when there is an error but fileHandle is not nil. + completion(strongSelf->_fileHandle ? fileURL : nil, bdxError); + [strongSelf deleteFile]; + + done(strongSelf); + } + }); + }; + + _fileDesignator = fileDesignator; + _fabricIndex = fabricIndex; + _nodeID = nodeID; + _fileURL = fileURL; + _fileHandle = nil; + _finalize = bdxTransferDone; + } + return self; +} + +- (void)checkInteractionModelResponse:(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable)response error:(NSError * _Nullable)error +{ + VerifyOrReturn(nil == error, [self failure:error]); + + auto status = response.status; + + VerifyOrReturn(![status isEqual:@(MTRDiagnosticLogsStatusBusy)], [self failure:[MTRError errorForCHIPErrorCode:CHIP_ERROR_BUSY]]); + VerifyOrReturn(![status isEqual:@(MTRDiagnosticLogsStatusDenied)], [self failure:[MTRError errorForCHIPErrorCode:CHIP_ERROR_ACCESS_DENIED]]); + + // If there is not logs for the given type, forward it to the caller with a nil url and stop here. + VerifyOrReturn(![status isEqual:@(MTRDiagnosticLogsStatusNoLogs)], [self success]); + + // If the whole log content fits into the response LogContent field, forward it to the caller + // and stop here. + if ([status isEqual:@(MTRDiagnosticLogsStatusExhausted)]) { + NSError * writeError = nil; + [self writeToFile:response.logContent error:&writeError]; + VerifyOrReturn(nil == writeError, [self failure:[MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]]); + + [self success]; + return; + }; + + // The file is going to be transferred over BDX. Everything past this point will be handled in bdxTransferDone. +} + +- (void)createFile:(NSError **)error +{ + VerifyOrReturn(nil == _fileHandle); + + auto * fileManager = [NSFileManager defaultManager]; + [fileManager URLForDirectory:NSItemReplacementDirectory + inDomain:NSUserDomainMask + appropriateForURL:_fileURL + create:YES + error:error]; + VerifyOrReturn(nil == *error); + + BOOL success = [fileManager createFileAtPath:[_fileURL path] contents:nil attributes:nil]; + VerifyOrReturn(success, *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]); + + auto * fileHandle = [NSFileHandle fileHandleForWritingToURL:_fileURL error:error]; + VerifyOrReturn(nil == *error); + + _fileHandle = fileHandle; +} + +- (void)deleteFile +{ + VerifyOrReturn(nil != _fileHandle); + + NSError * error = nil; + [[NSFileManager defaultManager] removeItemAtPath:[_fileURL path] error:&error]; + if (nil != error) { + // There is an error but there is really not much we can do at that point besides logging it. + MTR_LOG_ERROR("Error: %@", error); + } +} + +- (void)writeToFile:(NSData *)data error:(out NSError **)error +{ + [self createFile:error]; + [_fileHandle seekToEndOfFile]; + [_fileHandle writeData:data error:error]; +} + +- (BOOL)compare:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID +{ + return [_fileDesignator isEqualToString:fileDesignator] && _fabricIndex == fabricIndex && _nodeID == nodeID; +} + +- (void)failure:(NSError * _Nullable)error +{ + _finalize(error); +} + +- (void)success +{ + _finalize(nil); +} + +- (NSURL *)_toFileURL:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID +{ + auto * dateFormatter = [[NSDateFormatter alloc] init]; + dateFormatter.dateFormat = @"yyyy-MM-dd_HH:mm:ss.SSSZZZ"; + auto * timeString = [dateFormatter stringFromDate:NSDate.now]; + auto * nodeIDString = [self _toNodeIDString:nodeID]; + auto * typeString = [self _toTypeString:type]; + auto * filename = [NSString stringWithFormat:@"%@_%@_%@", timeString, nodeIDString, typeString]; + return [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:filename] isDirectory:YES]; +} + +- (NSString *)_toFileDesignatorString:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID +{ + auto * nodeIDString = [self _toNodeIDString:nodeID]; + auto * typeString = [self _toTypeString:type]; + auto * fileDesignator = [NSString stringWithFormat:@"bdx://%@/%@", nodeIDString, typeString]; + auto substringIndex = MIN(chip::bdx::DiagnosticLogs::kMaxFileDesignatorLen, [fileDesignator length]); + return [fileDesignator substringToIndex:substringIndex]; +} + +- (NSString *)_toNodeIDString:(NSNumber *)nodeID +{ + return [NSString stringWithFormat:@"%016llX", nodeID.unsignedLongLongValue]; +} + +- (NSString *)_toTypeString:(MTRDiagnosticLogType)type +{ + switch (type) { + case MTRDiagnosticLogTypeEndUserSupport: + return kEndUserSupport; + case MTRDiagnosticLogTypeNetworkDiagnostics: + return kNetworkDiagnostics; + case MTRDiagnosticLogTypeCrash: + return kCrash; + default: + // This should never happen. + chipDie(); + } +} + +@end + +@implementation Downloads +- (instancetype)init +{ + if (self = [super init]) { + _downloads = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc +{ + auto error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; + for (Download * download in _downloads) { + [download failure:error]; + } + _downloads = nil; +} + +- (Download * _Nullable)get:(NSString *)fileDesignator fabricIndex:(NSNumber *)fabricIndex nodeID:(NSNumber *)nodeID +{ + for (Download * download in _downloads) { + if ([download compare:fileDesignator fabricIndex:fabricIndex nodeID:nodeID]) { + return download; + } + } + + return nil; +} + +- (Download * _Nullable)add:(MTRDiagnosticLogType)type + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion + done:(void (^)(Download * finishedDownload))done +{ + auto download = [[Download alloc] initWithType:type fabricIndex:fabricIndex nodeID:nodeID queue:queue completion:completion done:done]; + VerifyOrReturnValue(nil != download, nil); + + [_downloads addObject:download]; + return download; +} + +- (void)remove:(Download *)download +{ + [_downloads removeObject:download]; +} +@end + +@implementation MTRDiagnosticLogsDownloader +- (instancetype)init +{ + assertChipStackLockedByCurrentThread(); + + if (self = [super init]) { + _downloads = [[Downloads alloc] init]; + _bridge = new DiagnosticLogsDownloaderBridge(self); + if (_bridge == nullptr) { + MTR_LOG_ERROR("Error: %@", kErrorInitDiagnosticLogsDownloader); + return nil; + } + } + return self; +} + +- (void)dealloc +{ + if (_bridge) { + delete _bridge; + _bridge = nil; + } + _downloads = nil; +} + +- (chip::bdx::BDXTransferServerDelegate *)getBridge +{ + return _bridge; +} + +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; +{ + assertChipStackLockedByCurrentThread(); + + uint16_t timeoutInSeconds = 0; + if (timeout <= 0) { + timeoutInSeconds = 0; + } else if (timeout > UINT16_MAX) { + MTR_LOG_INFO("Warning: timeout is too large. It will be truncated to UINT16_MAX."); + timeoutInSeconds = UINT16_MAX; + } else { + timeoutInSeconds = static_cast(timeout); + } + + // This block is always called when a download is finished. + auto done = ^(Download * finishedDownload) { + [controller asyncDispatchToMatterQueue:^() { + [self->_downloads remove:finishedDownload]; + + if (timeoutInSeconds > 0) { + self->_bridge->CancelBDXTransferTimeout(finishedDownload); + } + } errorHandler:nil]; + }; + + auto fabricIndex = @(controller.fabricIndex); + auto download = [_downloads add:type fabricIndex:fabricIndex nodeID:nodeID queue:queue completion:completion done:done]; + VerifyOrReturn(nil != download, + dispatch_async(queue, ^{ completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]); })); + + auto interactionModelDone = ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable response, NSError * _Nullable error) { + [download checkInteractionModelResponse:response error:error]; + }; + + auto * device = [controller deviceForNodeID:nodeID]; + auto * cluster = [[MTRClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(kDiagnosticLogsEndPoint) queue:queue]; + + auto * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + params.intent = @(type); + params.requestedProtocol = @(MTRDiagnosticLogsTransferProtocolBDX); + params.transferFileDesignator = download.fileDesignator; + + [cluster retrieveLogsRequestWithParams:params expectedValues:nil expectedValueInterval:nil completion:interactionModelDone]; + + if (timeoutInSeconds > 0) { + auto err = _bridge->StartBDXTransferTimeout(download, timeoutInSeconds); + VerifyOrReturn(CHIP_NO_ERROR == err, [download failure:[MTRError errorForCHIPErrorCode:err]]); + } +} + +- (void)handleBDXTransferSessionBeginForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + completion:(MTRStatusCompletion)completion + abortHandler:(AbortHandler)abortHandler; +{ + assertChipStackLockedByCurrentThread(); + MTR_LOG_DEFAULT("BDX Transfer Session Begin: %@", fileDesignator); + + auto * download = [_downloads get:fileDesignator fabricIndex:fabricIndex nodeID:nodeID]; + VerifyOrReturn(nil != download, completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_FOUND])); + + download.abortHandler = abortHandler; + completion(nil); +} + +- (void)handleBDXTransferSessionDataForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + data:(NSData *)data + completion:(MTRStatusCompletion)completion +{ + assertChipStackLockedByCurrentThread(); + MTR_LOG_DEFAULT("BDX Transfer Session Data: %@: %@", fileDesignator, data); + + auto * download = [_downloads get:fileDesignator fabricIndex:fabricIndex nodeID:nodeID]; + VerifyOrReturn(nil != download, completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_FOUND])); + + NSError * error = nil; + [download writeToFile:data error:&error]; + VerifyOrReturn(nil != error, completion(error)); + + completion(nil); +} + +- (void)handleBDXTransferSessionEndForFileDesignator:(NSString *)fileDesignator + fabricIndex:(NSNumber *)fabricIndex + nodeID:(NSNumber *)nodeID + error:(NSError * _Nullable)error +{ + assertChipStackLockedByCurrentThread(); + MTR_LOG_DEFAULT("BDX Transfer Session End: %@: %@", fileDesignator, error); + + auto * download = [_downloads get:fileDesignator fabricIndex:fabricIndex nodeID:nodeID]; + VerifyOrReturn(nil != download); + + VerifyOrReturn(nil == error, [download failure:error]); + [download success]; +} +@end + +DiagnosticLogsDownloaderBridge::DiagnosticLogsDownloaderBridge(MTRDiagnosticLogsDownloader * delegate) +{ + mDelegate = delegate; +} + +DiagnosticLogsDownloaderBridge::~DiagnosticLogsDownloaderBridge() +{ + mDelegate = nil; +} + +CHIP_ERROR DiagnosticLogsDownloaderBridge::OnTransferBegin(chip::bdx::BDXTransferProxy * transfer) +{ + VerifyOrReturnError(nil != mDelegate, CHIP_ERROR_INCORRECT_STATE); + + auto fileDesignatorSpan = transfer->GetFileDesignator(); + auto fileDesignator = AsString(fileDesignatorSpan); + VerifyOrReturnError(nil != fileDesignator, CHIP_ERROR_INCORRECT_STATE); + + auto * fabricIndex = @(transfer->GetFabricIndex()); + auto * nodeId = @(transfer->GetPeerNodeId()); + + auto completionHandler = ^(NSError * _Nullable error) { + assertChipStackLockedByCurrentThread(); + + if (error != nil) { + auto err = [MTRError errorToCHIPErrorCode:error]; + transfer->Reject(err); + } else { + transfer->Accept(); + } + }; + + // Ideally we would like to handle aborts a bit differently since this only works + // because our BDX stack supports one transfer at a time. + mAbortHandler = ^(NSError * error) { + assertChipStackLockedByCurrentThread(); + auto err = [MTRError errorToCHIPErrorCode:error]; + transfer->Reject(err); + }; + + [mDelegate handleBDXTransferSessionBeginForFileDesignator:fileDesignator + fabricIndex:fabricIndex + nodeID:nodeId + completion:completionHandler + abortHandler:mAbortHandler]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticLogsDownloaderBridge::OnTransferEnd(chip::bdx::BDXTransferProxy * transfer, CHIP_ERROR error) +{ + VerifyOrReturnError(nil != mDelegate, CHIP_ERROR_INCORRECT_STATE); + + auto fileDesignatorSpan = transfer->GetFileDesignator(); + auto fileDesignator = AsString(fileDesignatorSpan); + VerifyOrReturnError(nil != fileDesignator, CHIP_ERROR_INCORRECT_STATE); + + NSError * mtrError = nil; + if (CHIP_NO_ERROR != error) { + mtrError = [MTRError errorForCHIPErrorCode:error]; + } + + auto * fabricIndex = @(transfer->GetFabricIndex()); + auto * nodeId = @(transfer->GetPeerNodeId()); + [mDelegate handleBDXTransferSessionEndForFileDesignator:fileDesignator + fabricIndex:fabricIndex + nodeID:nodeId + error:mtrError]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticLogsDownloaderBridge::OnTransferData(chip::bdx::BDXTransferProxy * transfer, const chip::ByteSpan & dataSpan) +{ + VerifyOrReturnError(nil != mDelegate, CHIP_ERROR_INCORRECT_STATE); + + auto fileDesignatorSpan = transfer->GetFileDesignator(); + auto fileDesignator = AsString(fileDesignatorSpan); + VerifyOrReturnError(nil != fileDesignator, CHIP_ERROR_INCORRECT_STATE); + + auto * fabricIndex = @(transfer->GetFabricIndex()); + auto * nodeId = @(transfer->GetPeerNodeId()); + + auto data = AsData(dataSpan); + VerifyOrReturnError(nil != data, CHIP_ERROR_INCORRECT_STATE); + + auto completionHandler = ^(NSError * _Nullable error) { + assertChipStackLockedByCurrentThread(); + + if (error != nil) { + auto err = [MTRError errorToCHIPErrorCode:error]; + transfer->Reject(err); + } else { + transfer->Continue(); + } + }; + + mAbortHandler = nil; + + [mDelegate handleBDXTransferSessionDataForFileDesignator:fileDesignator + fabricIndex:fabricIndex + nodeID:nodeId + data:data + completion:completionHandler]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticLogsDownloaderBridge::StartBDXTransferTimeout(Download * download, uint16_t timeoutInSeconds) +{ + assertChipStackLockedByCurrentThread(); + return chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(timeoutInSeconds), OnTransferTimeout, (__bridge void *) download); +} + +void DiagnosticLogsDownloaderBridge::CancelBDXTransferTimeout(Download * download) +{ + assertChipStackLockedByCurrentThread(); + chip::DeviceLayer::SystemLayer().CancelTimer(OnTransferTimeout, (__bridge void *) download); +} + +void DiagnosticLogsDownloaderBridge::OnTransferTimeout(chip::System::Layer * layer, void * context) +{ + assertChipStackLockedByCurrentThread(); + + auto * download = (__bridge Download *) context; + VerifyOrReturn(nil != download); + + // If there is no abortHandler, it means that the BDX transfer has not started. + // When a BDX transfer has started we need to abort the transfer and we would error out + // at next poll. We would end up calling OnTransferEnd and eventually [download failure:error]. + // But if the transfer has not started we would stop right now. + auto error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_TIMEOUT]; + if (download.abortHandler == nil) { + [download failure:error]; + } else { + download.abortHandler(error); + } +} diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsType.h b/src/darwin/Framework/CHIP/MTRDiagnosticLogsType.h new file mode 100644 index 00000000000000..7d8675903329bb --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsType.h @@ -0,0 +1,27 @@ +/** + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This enum is used to specify the type of log requested from this device. + * + * The log types are : End User Support, Network Diagnostics and Crash logs. + */ +typedef NS_ENUM(NSInteger, MTRDiagnosticLogType) { + MTRDiagnosticLogTypeEndUserSupport = 0, // End user support log is requested + MTRDiagnosticLogTypeNetworkDiagnostics = 1, // Network Diagnostics log is requested + MTRDiagnosticLogTypeCrash = 2 // Crash log is requested +} MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 2cf62428bbfc2c..85f1399268f1a1 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -45,6 +45,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 72565dd46f127f..ea1b9b8bf338c4 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -299,10 +299,16 @@ B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F82A9FEC4F00807602 /* unix-misc.c */; }; B45374002A9FEC4F00807602 /* unix-init.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F92A9FEC4F00807602 /* unix-init.c */; }; B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373FA2A9FEC4F00807602 /* unix-sockets.c */; }; + B4C8E6B72B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */; }; B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */; }; B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */; }; B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */; }; B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */; }; + B4FCD56A2B5EDBD300832859 /* MTRDiagnosticLogsType.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B4FCD5732B611EB300832859 /* MTRDiagnosticLogsDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */; }; + B4FCD5702B603A6300832859 /* Commands.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56D2B603A6300832859 /* Commands.h */; }; + B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */; }; + B4FCD5722B603A6300832859 /* DownloadLogCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */; }; BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BA09EB3F2474762900605257 /* libCHIP.a */; }; D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = D4772A45285AE98300383630 /* MTRClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ @@ -669,10 +675,16 @@ B45373F82A9FEC4F00807602 /* unix-misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-misc.c"; path = "repo/lib/plat/unix/unix-misc.c"; sourceTree = ""; }; B45373F92A9FEC4F00807602 /* unix-init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-init.c"; path = "repo/lib/plat/unix/unix-init.c"; sourceTree = ""; }; B45373FA2A9FEC4F00807602 /* unix-sockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-sockets.c"; path = "repo/lib/plat/unix/unix-sockets.c"; sourceTree = ""; }; + B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDiagnosticLogsDownloader.h; sourceTree = ""; }; + B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDiagnosticLogsDownloader.mm; sourceTree = ""; }; B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteDataModelLogger.mm; sourceTree = ""; }; B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteDataModelLogger.h; sourceTree = ""; }; B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepCommand.mm; sourceTree = ""; }; B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WaitForCommissioneeCommand.mm; sourceTree = ""; }; + B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDiagnosticLogsType.h; sourceTree = ""; }; + B4FCD56D2B603A6300832859 /* Commands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Commands.h; sourceTree = ""; }; + B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadLogCommand.h; sourceTree = ""; }; + B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadLogCommand.mm; sourceTree = ""; }; BA09EB3F2474762900605257 /* libCHIP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCHIP.a; path = lib/libCHIP.a; sourceTree = BUILT_PRODUCTS_DIR; }; BA107AEE2470CFBB004287EB /* chip_xcode_build_connector.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = chip_xcode_build_connector.sh; sourceTree = ""; }; D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRErrorTestUtils.h; sourceTree = ""; }; @@ -741,6 +753,7 @@ 037C3D7B2991BD4F00B7EEE2 /* commands */ = { isa = PBXGroup; children = ( + B4FCD56C2B603A6300832859 /* bdx */, B4E262182AA0CFFE00DBA5BC /* delay */, 03FB93DA2A46200A0048CB35 /* discover */, 037C3D7C2991BD4F00B7EEE2 /* pairing */, @@ -1105,6 +1118,9 @@ B202528F2459E34F00F97062 /* CHIP */ = { isa = PBXGroup; children = ( + B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */, + B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */, + B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */, 1E4D655129C30A8700BC3478 /* MTRCommissionableBrowser.mm */, 1E4D654C29C208DD00BC3478 /* MTRCommissionableBrowser.h */, 1E4D654D29C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h */, @@ -1339,6 +1355,16 @@ path = delay; sourceTree = ""; }; + B4FCD56C2B603A6300832859 /* bdx */ = { + isa = PBXGroup; + children = ( + B4FCD56D2B603A6300832859 /* Commands.h */, + B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */, + B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */, + ); + path = bdx; + sourceTree = ""; + }; BA09EB3E2474762900605257 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1368,6 +1394,7 @@ 037C3DCE2991BD5100B7EEE2 /* CHIPCommandBridge.h in Headers */, 037C3DD22991BD5200B7EEE2 /* InteractiveCommands.h in Headers */, 037C3DAF2991BD4F00B7EEE2 /* DeviceControllerDelegateBridge.h in Headers */, + B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */, 037C3DC32991BD5100B7EEE2 /* Commands.h in Headers */, 037C3DB82991BD5000B7EEE2 /* ClusterCommandBridge.h in Headers */, 037C3DC82991BD5100B7EEE2 /* CHIPToolKeypair.h in Headers */, @@ -1380,6 +1407,7 @@ 037C3DB92991BD5000B7EEE2 /* ReportCommandBridge.h in Headers */, 037C3DBE2991BD5000B7EEE2 /* OTASoftwareUpdateInteractive.h in Headers */, 037C3DBD2991BD5000B7EEE2 /* OTAProviderDelegate.h in Headers */, + B4FCD5702B603A6300832859 /* Commands.h in Headers */, 037C3DB02991BD4F00B7EEE2 /* Commands.h in Headers */, 037C3DC02991BD5100B7EEE2 /* Commands.h in Headers */, B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */, @@ -1411,6 +1439,7 @@ 5178E6812AE098520069DF72 /* MTRCommandTimedCheck.h in Headers */, 7596A84B287636C1004DAE0E /* MTRDevice_Internal.h in Headers */, 5A6FEC9927B5C88900F25F42 /* MTRDeviceOverXPC.h in Headers */, + B4FCD5732B611EB300832859 /* MTRDiagnosticLogsDownloader.h in Headers */, 51B22C222740CB1D008D5055 /* MTRCommandPayloadsObjc.h in Headers */, 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */, 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */, @@ -1460,6 +1489,7 @@ 998F286D26D55E10001846C6 /* MTRKeypair.h in Headers */, 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */, 3D843711294977000070D20A /* NSStringSpanConversion.h in Headers */, + B4FCD56A2B5EDBD300832859 /* MTRDiagnosticLogsType.h in Headers */, 5A6FEC9A27B5C89300F25F42 /* MTRDeviceControllerXPCConnection.h in Headers */, 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */, 2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */, @@ -1643,6 +1673,7 @@ B45373C12A9FEA9100807602 /* close.c in Sources */, 039546A62991E151006D42A8 /* InteractionModel.cpp in Sources */, B45373E72A9FEBA400807602 /* parsers.c in Sources */, + B4FCD5722B603A6300832859 /* DownloadLogCommand.mm in Sources */, B45373BF2A9FEA9100807602 /* adopt.c in Sources */, B45373F32A9FEC1A00807602 /* server-ws.c in Sources */, 03F430AA2994113500166449 /* sysunix.c in Sources */, @@ -1736,6 +1767,7 @@ AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */, 51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */, 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */, + B4C8E6B72B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm in Sources */, 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */, 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */, 2C222AD1255C620600E446B9 /* MTRBaseDevice.mm in Sources */, From 59c40cdafff842e26ed898b32ae5b8eed7b61c50 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 24 Jan 2024 23:40:38 +0100 Subject: [PATCH 24/45] Use SIGTERM to end test process for yaml tests (#31650) * Use SIGTERM to end test process for yaml tests fixes #31574 I tested it with chip all clusters-app and also matter.js and it works, also the case where it falls back to killing if process did not terminates after 10s * styling * typo fix --- scripts/tests/chiptest/test_definition.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 89281c114365a8..037bf5aafbb29c 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -16,6 +16,7 @@ import logging import os import shutil +import subprocess import tempfile import threading import time @@ -63,10 +64,7 @@ def stop(self): with self.cv_stopped: self.stopped = True self.cv_stopped.notify() - self.process.kill() - self.process.wait(10) - self.process = None - self.outpipe = None + self.__terminateProcess() return True return False @@ -90,8 +88,7 @@ def waitForMessage(self, message): return True def kill(self): - if self.process: - self.process.kill() + self.__terminateProcess() self.killed = True def wait(self, timeout=None): @@ -158,6 +155,18 @@ def __updateSetUpCode(self): raise Exception("Unable to find QR code") self.setupCode = qrLine.group(1) + def __terminateProcess(self): + if self.process: + self.process.terminate() # sends SIGTERM + try: + self.process.wait(10) + except subprocess.TimeoutExpired: + logging.debug('Subprocess did not terminated on SIGTERM, killing it now') + self.process.kill() + self.process.wait(10) + self.process = None + self.outpipe = None + class TestTarget(Enum): ALL_CLUSTERS = auto() From e78c8a543b12c6d0301d81e92f15799e7f7aab2b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 24 Jan 2024 18:37:31 -0500 Subject: [PATCH 25/45] Add a Darwin framework utility to convert data-value dictionaries to TLV in NSData. (#31666) Not public API, just an internal utility. --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 21 +++++++++++++++++++ .../Framework/CHIP/MTRBaseDevice_Internal.h | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 77b3e0160f68a3..a14986d2e24f5a 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -743,6 +743,27 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW return CHIP_ERROR_INVALID_ARGUMENT; } +NSData * _Nullable MTREncodeTLVFromDataValueDictionary(NSDictionary * value, NSError * __autoreleasing * error) +{ + // A single data item cannot be bigger than a packet, so just use 1200 bytes + // as the max size of our buffer. This assumes that lists will not be + // passed as-is to this method but will get chunked, with each list item + // passed to this method separately. + uint8_t buffer[1200]; + TLV::TLVWriter writer; + writer.Init(buffer); + + CHIP_ERROR err = MTREncodeTLVFromDataValueDictionary(value, writer, TLV::AnonymousTag()); + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + return AsData(ByteSpan(buffer, writer.GetLengthWritten())); +} + // Callback type to pass data value as an NSObject typedef void (*MTRDataValueDictionaryCallback)(void * context, id value); diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 606ebdfac3a2e8..71cdee11d3687d 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -230,4 +230,10 @@ static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type) // Convert TLV data into data-value dictionary as described in MTRDeviceResponseHandler NSDictionary * _Nullable MTRDecodeDataValueDictionaryFromCHIPTLV(chip::TLV::TLVReader * data); +// Convert a data-value dictionary as described in MTRDeviceResponseHandler into +// TLV Data with an anonymous tag. This method assumes the encoding of the +// value fits in a single UDP MTU; for lists this method might need to be used +// on each list item separately. +NSData * _Nullable MTREncodeTLVFromDataValueDictionary(NSDictionary * value, NSError * __autoreleasing * error); + NS_ASSUME_NONNULL_END From 490286b5a982934cc1e7d93ede76d7a3ec6adcac Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 24 Jan 2024 19:29:51 -0500 Subject: [PATCH 26/45] Add support to Linux examples to report 5GHz Wi-Fi support (#31670) * Add support to Linux examples to report 5GHz Wi-Fi support - Linux has noo easy/portable API to determine 5GHz Wi-Fisupport that could be used in Linux platform examples without large changes. - To be able to test SupportedWiFiBands attribute, we have to allow reporting the support for 5GHz Wi-Fi when available. - A workaround was found by adding `--wifi-supports-5g` command line argument to examples, and the requisite plumbing in Linux Wi-Fi driver. Fixes #30109 Testing done: - Automated test of TC-CNET-* that use this support the new argument will come in a follow-up. - Manually testing between invocations with the following: ``` Terminal1: rm -f kvs1 && out/debug/standalone/chip-all-clusters-app --KVS kvs1 --wifi --wifi-supports-5g Terminal2: ./out/debug/standalone/chip-tool pairing onnetwork 1 20202021 Terminal2: ./out/debug/standalone/chip-tool networkcommissioning read supported-wi-fi-bands 1 0 Verify read has 2 entries: [0, 2] Terminal1: killall chip-all-clusters-app Terminal1: out/debug/standalone/chip-all-clusters-app --KVS kvs1 --wifi Terminal2: ./out/debug/standalone/chip-tool networkcommissioning read supported-wi-fi-bands 1 0 Verify read has 1 entry: [0] ``` * Restyled by clang-format * Improve comments --------- Co-authored-by: Restyled.io --- examples/platform/linux/AppMain.cpp | 31 ++++++++++--------- examples/platform/linux/Options.cpp | 13 +++++++- examples/platform/linux/Options.h | 1 + .../Linux/NetworkCommissioningDriver.h | 14 +++++++++ 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 56098c7c490548..933502dc050c69 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -193,23 +193,24 @@ void InitNetworkCommissioning() emberAfEndpointEnableDisable(sSecondaryNetworkCommissioningEndpoint.Value(), false); } - const bool kThreadEnabled = { + bool isThreadEnabled = false; #if CHIP_APP_MAIN_HAS_THREAD_DRIVER - LinuxDeviceOptions::GetInstance().mThread -#else - false -#endif - }; + isThreadEnabled = LinuxDeviceOptions::GetInstance().mThread; +#endif // CHIP_APP_MAIN_HAS_THREAD_DRIVER - const bool kWiFiEnabled = { + bool isWiFiEnabled = false; #if CHIP_APP_MAIN_HAS_WIFI_DRIVER - LinuxDeviceOptions::GetInstance().mWiFi -#else - false -#endif - }; + isWiFiEnabled = LinuxDeviceOptions::GetInstance().mWiFi; + + // On Linux, command-line indicates whether Wi-Fi is supported since determining it from + // the OS level is not easily portable. +#if CHIP_DEVICE_LAYER_TARGET_LINUX + sWiFiDriver.Set5gSupport(LinuxDeviceOptions::GetInstance().wifiSupports5g); +#endif // CHIP_DEVICE_LAYER_TARGET_LINUX + +#endif // CHIP_APP_MAIN_HAS_WIFI_DRIVER - if (kThreadEnabled && kWiFiEnabled) + if (isThreadEnabled && isWiFiEnabled) { if (sSecondaryNetworkCommissioningEndpoint.HasValue()) { @@ -224,11 +225,11 @@ void InitNetworkCommissioning() EnableThreadNetworkCommissioning(); } } - else if (kThreadEnabled) + else if (isThreadEnabled) { EnableThreadNetworkCommissioning(); } - else if (kWiFiEnabled) + else if (isWiFiEnabled) { EnableWiFiNetworkCommissioning(kRootEndpointId); } diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index 4c6791a178e48e..8398c728762bc9 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -90,6 +90,7 @@ enum #if CONFIG_BUILD_FOR_HOST_UNIT_TEST kDeviceOption_SubscriptionCapacity = 0x1024, #endif + kDeviceOption_WiFiSupports5g = 0x1025 }; constexpr unsigned kAppUsageLength = 64; @@ -100,6 +101,7 @@ OptionDef sDeviceOptionDefs[] = { #endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #if CHIP_DEVICE_CONFIG_ENABLE_WIFI { "wifi", kNoArgument, kDeviceOption_WiFi }, + { "wifi-supports-5g", kNoArgument, kDeviceOption_WiFiSupports5g }, #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA #if CHIP_ENABLE_OPENTHREAD { "thread", kNoArgument, kDeviceOption_Thread }, @@ -161,8 +163,13 @@ const char * sDeviceOptionHelp = #if CHIP_DEVICE_CONFIG_ENABLE_WPA "\n" " --wifi\n" - " Enable WiFi management via wpa_supplicant.\n" + " Enable Wi-Fi management via wpa_supplicant.\n" #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + "\n" + " --wifi-supports-5g\n" + " Indicate that local Wi-Fi hardware should report 5GHz support.\n" +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI #if CHIP_ENABLE_OPENTHREAD "\n" " --thread\n" @@ -311,6 +318,10 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier, LinuxDeviceOptions::GetInstance().mWiFi = true; break; + case kDeviceOption_WiFiSupports5g: + LinuxDeviceOptions::GetInstance().wifiSupports5g = true; + break; + case kDeviceOption_Thread: LinuxDeviceOptions::GetInstance().mThread = true; break; diff --git a/examples/platform/linux/Options.h b/examples/platform/linux/Options.h index 784c8d11ef1231..ca8082b5dcdc54 100644 --- a/examples/platform/linux/Options.h +++ b/examples/platform/linux/Options.h @@ -46,6 +46,7 @@ struct LinuxDeviceOptions chip::Optional> spake2pSalt; uint32_t spake2pIterations = 0; // When not provided (0), will default elsewhere uint32_t mBleDevice = 0; + bool wifiSupports5g = false; bool mWiFi = false; bool mThread = false; #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE || CHIP_DEVICE_ENABLE_PORT_PARAMS diff --git a/src/platform/Linux/NetworkCommissioningDriver.h b/src/platform/Linux/NetworkCommissioningDriver.h index 69169b697864d1..7b3734d75f4bbe 100644 --- a/src/platform/Linux/NetworkCommissioningDriver.h +++ b/src/platform/Linux/NetworkCommissioningDriver.h @@ -77,6 +77,8 @@ class LinuxWiFiDriver final : public WiFiDriver uint8_t credentialsLen = 0; }; + void Set5gSupport(bool is5gSupported) { mIs5gSupported = is5gSupported; } + // BaseDriver NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } CHIP_ERROR Init(BaseDriver::NetworkStatusChangeCallback * networkStatusChangeCallback) override; @@ -99,11 +101,23 @@ class LinuxWiFiDriver final : public WiFiDriver uint8_t & outNetworkIndex) override; void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + uint32_t GetSupportedWiFiBandsMask() const override + { + uint32_t supportedBands = static_cast(1UL << chip::to_underlying(WiFiBandEnum::k2g4)); + if (mIs5gSupported) + { + supportedBands |= static_cast(1UL << chip::to_underlying(WiFiBandEnum::k5g)); + } + return supportedBands; + } + private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; + // Whether 5GHz band is supported, as claimed by callers (`Set5gSupport()`) rather than syscalls. + bool mIs5gSupported = false; }; #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA From e5f5d6798ed47706078462f1697c481a8dc60bfa Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:29:17 -0500 Subject: [PATCH 27/45] [Scenes] Cluster Revision Update (#31615) * Updated cluster revision in zap, matter and test files * Refactored the revision number to 1 --- data_model/clusters/Scenes.xml | 119 +++++++------- .../all-clusters-app.matter | 6 +- .../all-clusters-common/all-clusters-app.zap | 4 +- .../all-clusters-minimal-app.matter | 6 +- .../all-clusters-minimal-app.zap | 4 +- examples/chef/devices/template.zap | 2 +- .../light-switch-app.matter | 2 +- .../light-switch-app/qpg/zap/switch.matter | 150 ++++++++++++++++++ examples/light-switch-app/qpg/zap/switch.zap | 134 +++++++++++++++- .../lighting-common/lighting-app.matter | 4 +- .../lighting-common/lighting-app.zap | 2 +- .../data_model/lighting-thread-app.matter | 8 +- .../silabs/data_model/lighting-thread-app.zap | 6 +- .../data_model/lighting-wifi-app.matter | 4 +- .../silabs/data_model/lighting-wifi-app.zap | 2 +- .../placeholder/linux/apps/app1/config.matter | 4 +- .../placeholder/linux/apps/app1/config.zap | 2 +- .../placeholder/linux/apps/app2/config.matter | 4 +- .../placeholder/linux/apps/app2/config.zap | 2 +- .../nxp/zap/thermostat_matter_thread.matter | 4 +- .../nxp/zap/thermostat_matter_thread.zap | 2 +- .../nxp/zap/thermostat_matter_wifi.matter | 4 +- .../nxp/zap/thermostat_matter_wifi.zap | 2 +- .../virtual-device-app.matter | 4 +- .../virtual-device-app.zap | 2 +- .../zap/tests/inputs/all-clusters-app.zap | 4 +- .../app-templates/endpoint_config.h | 4 +- .../suites/certification/Test_TC_S_1_1.yaml | 2 +- .../zcl/data-model/chip/scene.xml | 2 +- .../data_model/controller-clusters.matter | 2 +- .../zap-generated/test/Commands.h | 2 +- 31 files changed, 388 insertions(+), 111 deletions(-) diff --git a/data_model/clusters/Scenes.xml b/data_model/clusters/Scenes.xml index 920f9ae70746f0..2168c164a02460 100644 --- a/data_model/clusters/Scenes.xml +++ b/data_model/clusters/Scenes.xml @@ -1,68 +1,63 @@ - - + - - - - - - + diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 0b097380222275..91d26e041ad7a0 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3492,7 +3492,7 @@ cluster RvcOperationalState = 97 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -7990,7 +7990,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; @@ -8944,7 +8944,7 @@ endpoint 2 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index c9c353ddea89ca..12de6efc7065fe 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -6852,7 +6852,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23263,7 +23263,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 5c337c947f5b16..17689ab421469c 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -2398,7 +2398,7 @@ cluster TemperatureControl = 86 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -6393,7 +6393,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; @@ -6876,7 +6876,7 @@ endpoint 2 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 7197ba5cde3696..f81e261efc295c 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -4851,7 +4851,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -11142,7 +11142,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 0c008e214f83d8..6a1395f2eafb3f 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -2698,7 +2698,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 5d9dd797224529..334bfb3051ec8b 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2005,7 +2005,7 @@ cluster IcdManagement = 70 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 74a9b6c9195de0..fd531690030d37 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -1800,6 +1800,155 @@ cluster IcdManagement = 70 { command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 1; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional nullable node_id lastConfiguredBy = 0; + readonly attribute int16u sceneTableSize = 1; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int32u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int32u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int32u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 64 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2488,6 +2637,7 @@ endpoint 1 { binding cluster Groups; binding cluster OnOff; binding cluster LevelControl; + binding cluster ScenesManagement; binding cluster ColorControl; server cluster Identify { diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap index 929176cfe4e579..b4e956bc78fda3 100644 --- a/examples/light-switch-app/qpg/zap/switch.zap +++ b/examples/light-switch-app/qpg/zap/switch.zap @@ -4983,7 +4983,139 @@ "defaultValue": "4", "reportable": 1, "minInterval": 1, - "maxInterval": 65534, + "maxInterval": 65534 + } + ] + }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 7470a3d276136d..3f04f24e105034 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1826,7 +1826,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -2773,7 +2773,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 642b1ebd8ca3ea..45cd774e000978 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4670,7 +4670,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 6ee65e0c0a4408..316f09edb7fa30 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1911,7 +1911,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -2722,7 +2722,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; handle command Off; handle command On; @@ -2752,7 +2752,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; handle command MoveToLevel; handle command Move; @@ -2806,7 +2806,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 9b590006bd9824..1bf2408f188a46 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -4234,7 +4234,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4470,7 +4470,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4866,7 +4866,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 89230736ca54ac..ec8a065b9f5abd 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1822,7 +1822,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -2666,7 +2666,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index ef1e025c76159c..2d9a0039f65f25 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -3418,7 +3418,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 22096b4f85ee5c..23fa4be8cf3c1e 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2992,7 +2992,7 @@ cluster ModeSelect = 80 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -9123,7 +9123,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index a3b5ea13b87e19..c6e7a42156eeff 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -12015,7 +12015,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 686d45d2aec550..371408903fa89a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2949,7 +2949,7 @@ cluster ModeSelect = 80 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -9062,7 +9062,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 113ff2a5fa80c9..25a662e1d91f23 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -12097,7 +12097,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index e84ed749653ea0..c343ec1a9c4c74 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1727,7 +1727,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -2611,7 +2611,7 @@ endpoint 1 { ram attribute sceneTableSize; callback attribute fabricSceneInfo; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 27a590f385e5f2..d027da14fc9385 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -3942,7 +3942,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 3694138aaf4d92..8976281af7435d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1638,7 +1638,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -2467,7 +2467,7 @@ endpoint 1 { ram attribute sceneTableSize; callback attribute fabricSceneInfo; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 786119e6f475bd..e8c5237ebdfa6c 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -3084,7 +3084,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index e6a720544dfcb8..471bd88fbd0e04 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1874,7 +1874,7 @@ cluster UserLabel = 65 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; @@ -3418,7 +3418,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 1; handle command AddScene; handle command AddSceneResponse; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 8cc5d300692820..d3a9c539053487 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -4610,7 +4610,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index ff6ea72c7e2aad..7e28b20523ec8d 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -6209,7 +6209,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -15380,7 +15380,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 62a6e8d9e558c2..3d30ba408dd2f7 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -873,7 +873,7 @@ \ /* Endpoint: 1, Cluster: Scenes Management (server) */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { ZAP_SIMPLE_DEFAULT(2), 0x00000000, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LockState */ \ @@ -1440,7 +1440,7 @@ \ /* Endpoint: 2, Cluster: Scenes Management (server) */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* Occupancy */ \ diff --git a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml index 9f7cb7e7ced455..9b5eb4dbb4b155 100644 --- a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml @@ -37,7 +37,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 5 + value: 1 constraints: type: int16u diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index 484a5f0c7fd27c..e16047b9c14c07 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -50,7 +50,7 @@ limitations under the License. SCENES_CLUSTER true true - + LastConfiguredBy SceneTableSize diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9c2ec6c7a726d3..053b7fb99f969b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3724,7 +3724,7 @@ cluster RvcOperationalState = 97 { /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { - revision 5; + revision 1; bitmap CopyModeBitmap : bitmap8 { kCopyAllScenes = 0x1; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 190e565d6a219b..3ad4ef32b850de 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -189928,7 +189928,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); From 39bcd5d96628ad2af08e38b3eb01ecbc8e56a156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:14:32 +0100 Subject: [PATCH 28/45] [Boolean State Configuration] Fixes to test steps found during TE2 prep (#31641) * BOOLCFG test fixes * Fixed wrong bit used for command in 5.1 step 9b --- src/python_testing/TC_BOOLCFG_4_4.py | 2 +- src/python_testing/TC_BOOLCFG_5_1.py | 4 ++-- src/python_testing/TC_BOOLCFG_5_2.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python_testing/TC_BOOLCFG_4_4.py b/src/python_testing/TC_BOOLCFG_4_4.py index cd76848d59e801..12c350baedbc40 100644 --- a/src/python_testing/TC_BOOLCFG_4_4.py +++ b/src/python_testing/TC_BOOLCFG_4_4.py @@ -109,7 +109,7 @@ async def test_TC_BOOLCFG_4_4(self): logging.info("Test step skipped") self.step("5b") - if is_vis_feature_supported: + if is_aud_feature_supported: enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible else: logging.info("Test step skipped") diff --git a/src/python_testing/TC_BOOLCFG_5_1.py b/src/python_testing/TC_BOOLCFG_5_1.py index 7e7dac0e1e8adf..3d3d1b681752c9 100644 --- a/src/python_testing/TC_BOOLCFG_5_1.py +++ b/src/python_testing/TC_BOOLCFG_5_1.py @@ -102,7 +102,7 @@ async def test_TC_BOOLCFG_5_1(self): logging.info("Test step skipped") self.step("5b") - if is_vis_feature_supported: + if is_aud_feature_supported: enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible else: logging.info("Test step skipped") @@ -160,7 +160,7 @@ async def test_TC_BOOLCFG_5_1(self): self.step("9b") if not is_aud_feature_supported: try: - await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint) + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), endpoint=endpoint) asserts.fail("Received Success response when an CONSTRAINT_ERROR was expected") except InteractionModelError as e: asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error returned") diff --git a/src/python_testing/TC_BOOLCFG_5_2.py b/src/python_testing/TC_BOOLCFG_5_2.py index 3a4dd41b46bbf0..65dd00f7d690e2 100644 --- a/src/python_testing/TC_BOOLCFG_5_2.py +++ b/src/python_testing/TC_BOOLCFG_5_2.py @@ -101,7 +101,7 @@ async def test_TC_BOOLCFG_5_2(self): logging.info("Test step skipped") self.step("5b") - if is_vis_feature_supported: + if is_aud_feature_supported: enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible else: logging.info("Test step skipped") From 57349e9343dd72314e43ed69aa0322398372c021 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 25 Jan 2024 08:38:56 -0500 Subject: [PATCH 29/45] Expose the implemented ClusterRevision of Descriptor in a header. (#31671) This way SDK consumers can tell what version of that they have. --- src/app/clusters/descriptor/descriptor.cpp | 8 +++---- src/app/clusters/descriptor/descriptor.h | 27 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 src/app/clusters/descriptor/descriptor.h diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 8b7880745591be..2336d7cd96d5aa 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -28,6 +28,8 @@ #include #include +#include "descriptor.h" + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; @@ -45,8 +47,6 @@ class DescriptorAttrAccess : public AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: - static constexpr uint16_t ClusterRevision = 2; - CHIP_ERROR ReadTagListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadDeviceAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); @@ -55,8 +55,6 @@ class DescriptorAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; -constexpr uint16_t DescriptorAttrAccess::ClusterRevision; - CHIP_ERROR DescriptorAttrAccess::ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder) { Clusters::Descriptor::Structs::SemanticTagStruct::Type tag; @@ -202,7 +200,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadClientServerAttribute(EndpointId endpoint, CHIP_ERROR DescriptorAttrAccess::ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder) { - return aEncoder.Encode(ClusterRevision); + return aEncoder.Encode(kClusterRevision); } DescriptorAttrAccess gAttrAccess; diff --git a/src/app/clusters/descriptor/descriptor.h b/src/app/clusters/descriptor/descriptor.h new file mode 100644 index 00000000000000..8dd4ea745fcf66 --- /dev/null +++ b/src/app/clusters/descriptor/descriptor.h @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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. + */ + +namespace chip { +namespace app { +namespace Clusters { +namespace Descriptor { + +inline constexpr uint16_t kClusterRevision = 2; + +} // namespace Descriptor +} // namespace Clusters +} // namespace app +} // namespace chip From 325a7d08dfac586a18e45f8aacdbd96d7f0fb768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Thu, 25 Jan 2024 14:43:45 +0100 Subject: [PATCH 30/45] Fix outdated documentation (#31679) The minimal-mdns-client option -4 has been removed since the commit 0bc15781be9a1bd1f1af7cfd3637150bb1e8b5d5. --- examples/minimal-mdns/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/minimal-mdns/README.md b/examples/minimal-mdns/README.md index 391b7f0adb5bfe..da46c6cc578fb6 100644 --- a/examples/minimal-mdns/README.md +++ b/examples/minimal-mdns/README.md @@ -36,7 +36,7 @@ unicast queries. Example run: ```sh -./out/minimal_mdns/minimal-mdns-client -4 +./out/minimal_mdns/minimal-mdns-client ``` which is likely to list a lot of answers. @@ -44,7 +44,7 @@ which is likely to list a lot of answers. You can customize the queries run: ```sh -/out/minimal_mdns/minimal-mdns-client -4 -q chip-mdns-demo._matter._tcp.local +/out/minimal_mdns/minimal-mdns-client -q chip-mdns-demo._matter._tcp.local ``` see From a49adaceaa2485b8ffbf98c44fd5da9d61a3df27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Thu, 25 Jan 2024 14:47:12 +0100 Subject: [PATCH 31/45] Fix a typo in README.md (#31677) * Fix a typo in README.md * Fix merge error --------- Co-authored-by: Andrei Litvin --- examples/minimal-mdns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/minimal-mdns/README.md b/examples/minimal-mdns/README.md index da46c6cc578fb6..9e74f40701f016 100644 --- a/examples/minimal-mdns/README.md +++ b/examples/minimal-mdns/README.md @@ -44,7 +44,7 @@ which is likely to list a lot of answers. You can customize the queries run: ```sh -/out/minimal_mdns/minimal-mdns-client -q chip-mdns-demo._matter._tcp.local +./out/minimal_mdns/minimal-mdns-client -q chip-mdns-demo._matter._tcp.local ``` see From fe5dcfe18c9bd9a696ac41e81b650e670b339ba6 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 25 Jan 2024 14:25:53 +0000 Subject: [PATCH 32/45] Update rvc mode cluters with new mode restrictions (#31560) * Updated step 3 in TC 1.1 for RvcRunMode and RvcCleanMode * Updated TC 1.2 for RvcRunMode and RvcCleanMode cluters. * Added TC 2.2 for the RvcCleanMode cluster. * Restyled by autopep8 * Added TC 2.2 for the RvcRunMode cluster. * Removed unused imports. * Regenerated zap files. * Added the PICS provider methods to the new python tests. * Changed the features supported by the RVC mode cluters in the all-clusters-app to match recent changes in the spec and tests. * Added the mapping mode tag to the all-clusters-app example * Changed the response returned by the RVC clean mode's handler of the ChanedToMode command to match the new spec. * Updated TC_RVCCLEAN_2_2 to remove incorrect type checks. * Apply suggestions from code review Co-authored-by: C Freeman Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com> * Updated the RVC run ChangeToMode handler in the all-clusters-app to match the new spec behaviour. * Updated the cl-pics-values for the RVC Run and Clean clusters. * Future proofed the enum to text function and change to using the --endpoint flag. * Fixed retrival of the endpoint setting. * Simplified some of the test code following review. * Removed test steps to match the test plan. * Changed the capture of the endpoint for the RVC run and RVC clean test 2.1. * Restyled by clang-format * Restyled by autopep8 * Regenerated zap files. * Removed duplicate RVCRUNM PICS from the ci-pics-values. * Updated PICS.yaml to reflect the new PICS requirements for the RvcRunMode and RvcCleanMode clusters. * Made all RVC python tests consistent regarding the capture of the endpoint and their documentation. * Apply typo suggestions from code review Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com> * Fixed the RVC clean handle change to mode in the all-clusters-app. * Restyled by clang-format --------- Co-authored-by: Restyled.io Co-authored-by: C Freeman Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com> --- .../all-clusters-common/include/rvc-modes.h | 8 +- .../all-clusters-common/src/rvc-modes.cpp | 15 +- src/app/tests/suites/certification/PICS.yaml | 13 +- .../certification/Test_TC_RVCCLEANM_1_1.yaml | 34 -- .../certification/Test_TC_RVCRUNM_1_1.yaml | 36 +-- .../tests/suites/certification/ci-pics-values | 19 +- src/python_testing/TC_RVCCLEANM_1_2.py | 104 ++++--- src/python_testing/TC_RVCCLEANM_2_1.py | 44 +-- src/python_testing/TC_RVCCLEANM_2_2.py | 125 ++++++++ src/python_testing/TC_RVCRUNM_1_2.py | 123 +++++--- src/python_testing/TC_RVCRUNM_2_1.py | 44 +-- src/python_testing/TC_RVCRUNM_2_2.py | 182 +++++++++++ .../zap-generated/test/Commands.h | 294 +++--------------- 13 files changed, 537 insertions(+), 504 deletions(-) create mode 100644 src/python_testing/TC_RVCCLEANM_2_2.py create mode 100644 src/python_testing/TC_RVCRUNM_2_2.py diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h index af8313fa285385..8af4aa5f6f9155 100644 --- a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h @@ -41,6 +41,7 @@ class RvcRunModeDelegate : public ModeBase::Delegate using ModeTagStructType = detail::Structs::ModeTagStruct::Type; ModeTagStructType ModeTagsIdle[1] = { { .value = to_underlying(ModeTag::kIdle) } }; ModeTagStructType ModeTagsCleaning[1] = { { .value = to_underlying(ModeTag::kCleaning) } }; + ModeTagStructType ModeTagsMapping[1] = { { .value = to_underlying(ModeTag::kMapping) } }; const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = { detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Idle"), @@ -49,10 +50,9 @@ class RvcRunModeDelegate : public ModeBase::Delegate detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Cleaning"), .mode = ModeCleaning, .modeTags = DataModel::List(ModeTagsCleaning) }, - detail::Structs::ModeOptionStruct::Type{ - .label = CharSpan::fromCharString("Mapping"), - .mode = ModeMapping, - .modeTags = DataModel::List(ModeTagsIdle) }, // todo set to no mode tags + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Mapping"), + .mode = ModeMapping, + .modeTags = DataModel::List(ModeTagsMapping) }, }; CHIP_ERROR Init() override; diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 480c8f793ceb4d..999d62ae48c263 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -43,7 +43,7 @@ void RvcRunModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands: // Our business logic states that we can only switch into the mapping state from the idle state. if (NewMode == RvcRunMode::ModeMapping && currentMode != RvcRunMode::ModeIdle) { - response.status = to_underlying(ModeBase::StatusCode::kGenericFailure); + response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); response.statusText.SetValue(chip::CharSpan::fromCharString("Change to the mapping mode is only allowed from idle")); return; } @@ -112,8 +112,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = - new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kOnOff)); + gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, 0); gRvcRunModeInstance->Init(); } @@ -130,10 +129,11 @@ void RvcCleanModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Command { uint8_t rvcRunCurrentMode = gRvcRunModeInstance->GetCurrentMode(); - if (rvcRunCurrentMode == RvcRunMode::ModeCleaning) + if (rvcRunCurrentMode != RvcRunMode::ModeIdle) { - response.status = to_underlying(RvcCleanMode::StatusCode::kCleaningInProgress); - response.statusText.SetValue(chip::CharSpan::fromCharString("Cannot change the cleaning mode during a clean")); + response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); + response.statusText.SetValue( + chip::CharSpan::fromCharString("Cannot change the cleaning mode when the device is not in idle")); return; } @@ -201,7 +201,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = - new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcCleanMode::Feature::kOnOff)); + gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, 0); gRvcCleanModeInstance->Init(); } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index af29b4df7a37b9..93cfe963c6bc13 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -9116,12 +9116,6 @@ PICS: - label: "Does the device implement the CurrentMode attribute?" id: RVCCLEANM.S.A0001 - - label: "Does the device implement the StartUpMode attribute?" - id: RVCCLEANM.S.A0002 - - - label: "Does the device implement the OnMode attribute?" - id: RVCCLEANM.S.A0003 - # # server / Commands received # @@ -9334,11 +9328,8 @@ PICS: - label: "Does the device implement the CurrentMode attribute?" id: RVCRUNM.S.A0001 - - label: "Does the device implement the StartUpMode attribute?" - id: RVCRUNM.S.A0002 - - - label: "Does the device implement the OnMode attribute?" - id: RVCRUNM.S.A0003 + - label: "Can the mode change be manually controlled?" + id: RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED #Commands received - label: "Does the device implement receiving the ChangeToMode command?" diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml index f95386249c2dff..1a4dbae62cb01f 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml @@ -42,7 +42,6 @@ tests: type: int16u - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - PICS: " !RVCCLEANM.S.F00 " command: "readAttribute" attribute: "FeatureMap" response: @@ -50,17 +49,6 @@ tests: constraints: type: bitmap32 - - label: - "Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the - correct bit set" - PICS: RVCCLEANM.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -79,28 +67,6 @@ tests: type: list contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - - label: - "Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) - and optional attribute(OnMode) is in AttributeList from the DUT" - PICS: RVCCLEANM.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) - and optional attribute(OnMode) is not in AttributeList from the DUT" - PICS: " !RVCCLEANM.S.F00 " - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - excludes: [3] - - label: "Step 5: TH reads from the DUT the EventList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml index cb97b72a1d2a79..f9b4aed3db30c3 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml @@ -41,8 +41,7 @@ tests: constraints: type: int16u - - label: "Step 3a: TH reads from the DUT the FeatureMap attribute." - PICS: " !RVCRUNM.S.F00 " + - label: "Step 3: TH reads from the DUT the FeatureMap attribute." command: "readAttribute" attribute: "FeatureMap" response: @@ -50,17 +49,6 @@ tests: constraints: type: bitmap32 - - label: - "Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the - correct bit set" - PICS: RVCRUNM.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -79,28 +67,6 @@ tests: type: list contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - - label: - "Step 4c: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and - optional attribute(OnMode) is in AttributeList from the DUT" - PICS: RVCRUNM.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4d: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and - optional attribute(OnMode) is not in AttributeList from the DUT" - PICS: " !RVCRUNM.S.F00 " - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - excludes: [3] - - label: "Step 5: TH reads from the DUT the EventList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 4201b969a81020..4c4df4cef22a9a 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2438,11 +2438,9 @@ RVCCLEANM.S=1 #Server RVCCLEANM.S.A0000=1 RVCCLEANM.S.A0001=1 -RVCCLEANM.S.A0002=0 -RVCCLEANM.S.A0003=1 #Feature -RVCCLEANM.S.F00=1 +RVCCLEANM.S.F00=0 #commands RVCCLEANM.S.C00.Rsp=1 @@ -2506,19 +2504,18 @@ RVCOPSTATE.C.C04.Tx=1 # RVC RUN MODE CLUSTER RVCRUNM.S=1 -RVCRUNM.S.F00=1 +RVCRUNM.S.F00=0 #Server RVCRUNM.S.A0000=1 RVCRUNM.S.A0001=1 -RVCRUNM.S.A0002=0 -RVCRUNM.S.A0003=1 #Commands RVCRUNM.S.C00.Rsp=1 RVCRUNM.S.C01.Tx=1 RVCRUNM.S.M.CAN_TEST_MODE_FAILURE=1 +RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED=1 #PIXIT PIXIT.RVCRUNM.MODE_CHANGE_FAIL=1 @@ -2691,16 +2688,6 @@ WASHERCTRL.S.M.ManuallyControlledSpin=1 WASHERCTRL.S.M.ManuallyControlledRinse=1 WASHERCTRL.S.M.ManuallyControlled=0 -#RVC Run Mode -RVCRUNM.S=1 -RVCRUNM.S.F00=1 -RVCRUNM.S.A0000=1 -RVCRUNM.S.A0001=1 -RVCRUNM.S.A0002=0 -RVCRUNM.S.A0003=1 -RVCRUNM.S.C00.Rsp=1 -RVCRUNM.S.C01.Tx=1 - #Refrigerator Alarm REFALM.S=1 REFALM.C=1 diff --git a/src/python_testing/TC_RVCCLEANM_1_2.py b/src/python_testing/TC_RVCCLEANM_1_2.py index a3a764830e96be..2f3c6f9dd0085a 100644 --- a/src/python_testing/TC_RVCCLEANM_1_2.py +++ b/src/python_testing/TC_RVCCLEANM_1_2.py @@ -18,16 +18,26 @@ import logging import chip.clusters as Clusters -from chip.clusters.Types import NullValue from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts -# This test requires several additional command line arguments -# run with -# --int-arg PIXIT_ENDPOINT: - class TC_RVCCLEANM_1_2(MatterBaseTest): + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.commonTags = {0x0: 'Auto', + 0x1: 'Quick', + 0x2: 'Quiet', + 0x3: 'LowNoise', + 0x4: 'LowEnergy', + 0x5: 'Vacation', + 0x6: 'Min', + 0x7: 'Max', + 0x8: 'Night', + 0x9: 'Day'} + self.cleanTags = [tag.value for tag in Clusters.RvcCleanMode.Enums.ModeTag] + self.supported_modes_dut = [] async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcCleanMode @@ -38,12 +48,7 @@ def pics_TC_RVCCLEANM_1_2(self) -> list[str]: @async_test_body async def test_TC_RVCCLEANM_1_2(self): - - asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, - "PIXIT_ENDPOINT must be included on the command line in " - "the --int-arg flag as PIXIT_ENDPOINT:") - - self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + self.endpoint = self.matter_test_config.endpoint attributes = Clusters.RvcCleanMode.Attributes @@ -55,16 +60,18 @@ async def test_TC_RVCCLEANM_1_2(self): logging.info("SupportedModes: %s" % (supported_modes)) + # Verify that the list has at least 2 and at most 255 entries asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least 2 entries!") asserts.assert_less_equal(len(supported_modes), 255, "SupportedModes must have at most 255 entries!") - modes = [] + # Verify that each ModeOptionsStruct entry has a unique Mode field value for m in supported_modes: - if m.mode in modes: + if m.mode in self.supported_modes_dut: asserts.fail("SupportedModes must have unique mode values!") else: - modes.append(m.mode) + self.supported_modes_dut.append(m.mode) + # Verify that each ModeOptionsStruct entry has a unique Label field value labels = [] for m in supported_modes: if m.label in labels: @@ -72,47 +79,50 @@ async def test_TC_RVCCLEANM_1_2(self): else: labels.append(m.label) - # common mode tags - commonTags = {0x0: 'Auto', - 0x1: 'Quick', - 0x2: 'Quiet', - 0x3: 'LowNoise', - 0x4: 'LowEnergy', - 0x5: 'Vacation', - 0x6: 'Min', - 0x7: 'Max', - 0x8: 'Night', - 0x9: 'Day'} - - cleanTags = [tag.value for tag in Clusters.RvcCleanMode.Enums.ModeTag - if tag is not Clusters.RvcCleanMode.Enums.ModeTag.kUnknownEnumValue] - + # Verify that each ModeOptionsStruct entry's ModeTags field has: for m in supported_modes: + # * at least one entry + if len(m.modeTags) == 0: + asserts.fail("SupportedModes must have at least one mode tag!") + + at_least_one_common_or_clean_tag = False for t in m.modeTags: - is_mfg = (0x8000 <= t.value and t.value <= 0xBFFF) - asserts.assert_true(t.value in commonTags.keys() or t.value in cleanTags or is_mfg, - "Found a SupportedModes entry with invalid mode tag value!") + # * the values of the Value fields that are not larger than 16 bits + if t.value > 0xFFFF or t.value < 0: + asserts.fail("Mode tag values must not be larger than 16 bits!") + + # * for each Value field: {isCommonOrDerivedOrMfgTagsVal} + is_mfg = (0x8000 <= t.value <= 0xBFFF) + if (t.value not in self.commonTags and + t.value not in self.cleanTags and + not is_mfg): + asserts.fail("Mode tag value is not a common tag, clean tag or vendor tag!") + + # * for at least one Value field: {isCommonOrDerivedTagsVal} + if not is_mfg: + at_least_one_common_or_clean_tag = True + + if not at_least_one_common_or_clean_tag: + asserts.fail("At least one mode tag must be a common tag or clean tag!") + + # Verify that at least one ModeOptionsStruct entry includes either the + # Vacuum(0x4001) mode tag or the Mop(0x4002)mode tag in the ModeTags field + vacuum_mop_tags = [Clusters.RvcCleanMode.Enums.ModeTag.kVacuum, Clusters.RvcCleanMode.Enums.ModeTag.kMop] + has_vacuum_or_mop_mode_tag = False + for m in supported_modes: + has_vacuum_or_mop_mode_tag = any(t.value in vacuum_mop_tags for t in m.modeTags) + if has_vacuum_or_mop_mode_tag: + break + + asserts.assert_true(has_vacuum_or_mop_mode_tag, + "At least one ModeOptionsStruct entry must include either the Vacuum or Mop mode tag") if self.check_pics("RVCCLEANM.S.A0001"): self.print_step(3, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode in modes, "CurrentMode is not a supported mode!") - - if self.check_pics("RVCCLEANM.S.A0003"): - self.print_step(4, "Read OnMode attribute") - on_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) - - logging.info("OnMode: %s" % (on_mode)) - asserts.assert_true(on_mode in modes or on_mode == NullValue, "OnMode is not a supported mode!") - - if self.check_pics("RVCCLEANM.S.A0002"): - self.print_step(5, "Read StartUpMode attribute") - startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) - - logging.info("StartUpMode: %s" % (startup_mode)) - asserts.assert_true(startup_mode in modes or startup_mode == NullValue, "StartUpMode is not a supported mode!") + asserts.assert_true(current_mode in self.supported_modes_dut, "CurrentMode is not a supported mode!") if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 56743b6192551e..4f553206eb0a7f 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -23,11 +23,17 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: +# --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: class TC_RVCCLEANM_2_1(MatterBaseTest): + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.mode_ok = 0 + self.mode_fail = 0 + async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcCleanMode return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) @@ -44,9 +50,6 @@ def pics_TC_RVCCLEANM_2_1(self) -> list[str]: @async_test_body async def test_TC_RVCCLEANM_2_1(self): - asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, - "PIXIT_ENDPOINT must be included on the command line in " - "the --int-arg flag as PIXIT_ENDPOINT:") asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, "PIXIT.RVCCLEANM.MODE_CHANGE_OK must be included on the command line in " "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_OK:") @@ -54,9 +57,9 @@ async def test_TC_RVCCLEANM_2_1(self): "PIXIT.RVCCLEANM.MODE_CHANGE_FAIL must be included on the command line in " "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:") - self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_OK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_FAIL'] + self.endpoint = self.matter_test_config.endpoint + self.mode_ok = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_OK'] + self.mode_fail = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") @@ -93,8 +96,7 @@ class CommonCodes(Enum): GENERIC_FAILURE = 0x02 INVALID_IN_MODE = 0x03 - rvcCleanCodes = [code.value for code in Clusters.RvcCleanMode.Enums.StatusCode - if code is not Clusters.RvcCleanMode.Enums.StatusCode.kUnknownEnumValue] + rvcCleanCodes = [code.value for code in Clusters.RvcCleanMode.Enums.StatusCode] self.print_step(4, "Send ChangeToMode command with NewMode set to %d" % (old_current_mode)) @@ -102,9 +104,9 @@ class CommonCodes(Enum): asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") if self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE"): - asserts.assert_true(self.modefail in modes, - "The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.modefail)) - self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) + asserts.assert_true(self.mode_fail in modes, + "The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.mode_fail)) + self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.mode_fail)) input("Press Enter when done.\n") self.print_step(6, "Read CurrentMode attribute") @@ -112,15 +114,15 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.mode_fail)) - ret = await self.send_change_to_mode_cmd(newMode=self.modefail) + ret = await self.send_change_to_mode_cmd(newMode=self.mode_fail) st = ret.status is_mfg_code = st in range(0x80, 0xC0) is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or ( st == CommonCodes.INVALID_IN_MODE.value) or (st in rvcCleanCodes) or is_mfg_code asserts.assert_true( - is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) + is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.mode_fail)) st_text_len = len(ret.statusText) asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) @@ -131,7 +133,7 @@ class CommonCodes(Enum): asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") - self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.modeok)) + self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.mode_ok)) input("Press Enter when done.\n") self.print_step(10, "Read CurrentMode attribute") @@ -139,18 +141,18 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(11, "Send ChangeToMode command with NewMode set to %d" % (self.modeok)) + self.print_step(11, "Send ChangeToMode command with NewMode set to %d" % (self.mode_ok)) - ret = await self.send_change_to_mode_cmd(newMode=self.modeok) + ret = await self.send_change_to_mode_cmd(newMode=self.mode_ok) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, - "Changing to mode %d must succeed due to the current state of the device" % (self.modeok)) + "Changing to mode %d must succeed due to the current state of the device" % (self.mode_ok)) self.print_step(12, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == self.modeok, + asserts.assert_true(current_mode == self.mode_ok, "CurrentMode doesn't match the argument of the successful ChangeToMode command!") self.print_step(13, "Send ChangeToMode command with NewMode set to %d" % (invalid_mode)) @@ -164,7 +166,7 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == self.modeok, "CurrentMode changed after failed ChangeToMode command!") + asserts.assert_true(current_mode == self.mode_ok, "CurrentMode changed after failed ChangeToMode command!") if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCCLEANM_2_2.py b/src/python_testing/TC_RVCCLEANM_2_2.py new file mode 100644 index 00000000000000..a4107e12c70665 --- /dev/null +++ b/src/python_testing/TC_RVCCLEANM_2_2.py @@ -0,0 +1,125 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_RVCCLEANM_2_2(MatterBaseTest): + + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.supported_run_modes = {} # these are the ModeOptionStructs + self.supported_run_modes_dut = [] + self.supported_clean_modes_dut = [] + self.run_mode_dut = 0 + self.old_clean_mode_dut = 0 + self.new_clean_mode_th = 0 + + async def read_mod_attribute_expect_success(self, cluster, attribute): + return await self.read_single_attribute_check_success( + endpoint=self.endpoint, cluster=cluster, attribute=attribute) + + async def read_run_supported_modes(self) -> Clusters.Objects.RvcRunMode.Attributes.SupportedModes: + ret = await self.read_mod_attribute_expect_success( + Clusters.RvcRunMode, + Clusters.RvcRunMode.Attributes.SupportedModes) + return ret + + async def read_clean_supported_modes(self) -> Clusters.Objects.RvcCleanMode.Attributes.SupportedModes: + ret = await self.read_mod_attribute_expect_success( + Clusters.RvcCleanMode, + Clusters.RvcCleanMode.Attributes.SupportedModes) + return ret + + async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcCleanMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.RvcCleanMode.Commands.ChangeToMode(newMode=newMode), endpoint=self.endpoint) + return ret + + # Prints the instruction and waits for a user input to continue + def print_instruction(self, step_number, instruction): + self.print_step(step_number, instruction) + input("Press Enter when done.\n") + + def pics_TC_RVCCLEANM_2_2(self) -> list[str]: + return ["RVCCLEANM.S"] + + @async_test_body + async def test_TC_RVCCLEANM_2_2(self): + self.endpoint = self.matter_test_config.endpoint + + asserts.assert_true(self.check_pics("RVCCLEANM.S"), "RVCCLEANM.S must be supported") + asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") + + self.print_step(1, "Commissioning, already done") + + self.print_instruction(2, "Manually put the device in a state in which the RVC Run Mode " + "cluster’s CurrentMode attribute is set to a mode without the Idle mode tag.") + + self.print_step(3, "Read the RvcRunMode SupportedModes attribute") + supported_run_modes = await self.read_run_supported_modes() + for mode in supported_run_modes: + self.supported_run_modes[mode.mode] = mode + # Save the Mode field values as supported_run_modes_dut + self.supported_run_modes_dut.append(mode.mode) + + self.print_step(4, "Read the RvcRunMode CurrentMode attribute") + current_run_mode = await self.read_mod_attribute_expect_success( + Clusters.RvcRunMode, + Clusters.RvcRunMode.Attributes.CurrentMode) + + # Save the value as run_mode_dut + self.run_mode_dut = current_run_mode + + # Verify that the supported_run_modes_dut entry matching run_mode_dut does not have the Idle (0x4000) mode tag. + for t in self.supported_run_modes[current_run_mode].modeTags: + asserts.assert_true(t.value != Clusters.RvcRunMode.Enums.ModeTag.kIdle, + "The device must be in a mode without the Idle (0x4000) mode tag.") + + self.print_step(5, "Read the RvcCleanMode SupportedModes attribute") + supported_clean_modes = await self.read_clean_supported_modes() + for mode in supported_clean_modes: + # Save the Mode field values as supported_run_modes_dut + self.supported_clean_modes_dut.append(mode.mode) + + self.print_step(6, "Read the RvcCleanMode CurrentMode attribute") + current_clean_mode = await self.read_mod_attribute_expect_success( + Clusters.RvcCleanMode, + Clusters.RvcCleanMode.Attributes.CurrentMode) + + # Save the value as old_clean_mode_dut + self.old_clean_mode_dut = current_clean_mode + + # Select from supported_clean_modes_dut a value which is different from old_clean_mode_dut, + # and save it as new_clean_mode_th + for mode in self.supported_clean_modes_dut: + if mode != self.old_clean_mode_dut: + self.new_clean_mode_th = mode + break + + self.print_step(7, "Send ChangeToMode command") + response = await self.send_change_to_mode_cmd(self.new_clean_mode_th) + asserts.assert_equal(response.status, 3, + "The response should contain a ChangeToModeResponse command " + "with the Status set to InvalidInMode(0x03).") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_RVCRUNM_1_2.py b/src/python_testing/TC_RVCRUNM_1_2.py index 68684e45dd5c61..4fc9a1f5cab7d9 100644 --- a/src/python_testing/TC_RVCRUNM_1_2.py +++ b/src/python_testing/TC_RVCRUNM_1_2.py @@ -18,16 +18,26 @@ import logging import chip.clusters as Clusters -from chip.clusters.Types import NullValue from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts -# This test requires several additional command line arguments -# run with -# --int-arg PIXIT_ENDPOINT: - class TC_RVCRUNM_1_2(MatterBaseTest): + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.commonTags = {0x0: 'Auto', + 0x1: 'Quick', + 0x2: 'Quiet', + 0x3: 'LowNoise', + 0x4: 'LowEnergy', + 0x5: 'Vacation', + 0x6: 'Min', + 0x7: 'Max', + 0x8: 'Night', + 0x9: 'Day'} + self.runTags = [tag.value for tag in Clusters.RvcRunMode.Enums.ModeTag] + self.supported_modes_dut = [] async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcRunMode @@ -38,12 +48,7 @@ def pics_TC_RVCRUNM_1_2(self) -> list[str]: @async_test_body async def test_TC_RVCRUNM_1_2(self): - - asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, - "PIXIT_ENDPOINT must be included on the command line in " - "the --int-arg flag as PIXIT_ENDPOINT:") - - self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + self.endpoint = self.matter_test_config.endpoint attributes = Clusters.RvcRunMode.Attributes @@ -55,16 +60,18 @@ async def test_TC_RVCRUNM_1_2(self): logging.info("SupportedModes: %s" % (supported_modes)) + # Verify that the list has at least 2 and at most 255 entries asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least 2 entries!") asserts.assert_less_equal(len(supported_modes), 255, "SupportedModes must have at most 255 entries!") - modes = [] + # Verify that each ModeOptionsStruct entry has a unique Mode field value for m in supported_modes: - if m.mode in modes: + if m.mode in self.supported_modes_dut: asserts.fail("SupportedModes must have unique mode values!") else: - modes.append(m.mode) + self.supported_modes_dut.append(m.mode) + # Verify that each ModeOptionsStruct entry has a unique Label field value labels = [] for m in supported_modes: if m.label in labels: @@ -72,53 +79,69 @@ async def test_TC_RVCRUNM_1_2(self): else: labels.append(m.label) - # common mode tags - commonTags = {0x0: 'Auto', - 0x1: 'Quick', - 0x2: 'Quiet', - 0x3: 'LowNoise', - 0x4: 'LowEnergy', - 0x5: 'Vacation', - 0x6: 'Min', - 0x7: 'Max', - 0x8: 'Night', - 0x9: 'Day'} - - runTags = [tag.value for tag in Clusters.RvcRunMode.Enums.ModeTag - if tag is not Clusters.RvcRunMode.Enums.ModeTag.kUnknownEnumValue] + # Verify that each ModeOptionsStruct entry's ModeTags field has: + for m in supported_modes: + # * at least one entry + if len(m.modeTags) == 0: + asserts.fail("SupportedModes must have at least one mode tag!") + at_least_one_common_or_run_tag = False + for t in m.modeTags: + # * the values of the Value fields that are not larger than 16 bits + if t.value > 0xFFFF or t.value < 0: + asserts.fail("Mode tag values must not be larger than 16 bits!") + + # * for each Value field: {isCommonOrDerivedOrMfgTagsVal} + is_mfg = (0x8000 <= t.value <= 0xBFFF) + if (t.value not in self.commonTags and + t.value not in self.runTags and + not is_mfg): + asserts.fail("Mode tag value is not a common tag, run tag or vendor tag!") + + # * for at least one Value field: {isCommonOrDerivedTagsVal} + if not is_mfg: + at_least_one_common_or_run_tag = True + + if not at_least_one_common_or_run_tag: + asserts.fail("At least one mode tag must be a common tag or run tag!") + + # Verify that at least one ModeOptionsStruct entry includes the Idle(0x4000) + # mode tag in the ModeTags field + at_least_one_idle_mode_tag = False + # Verify that at least one ModeOptionsStruct entry includes the Cleaning(0x4001) + # mode tag in the ModeTags field + at_least_one_cleaning_mode_tag = False for m in supported_modes: + # Verify that each ModeOptionsStruct entry includes at most one of the following + # mode tags: Idle(0x4000), Cleaning(0x4001), _Mapping(0x4002) + count_of_idle_cleaning_or_mapping_mode_tags = 0 for t in m.modeTags: - is_mfg = (0x8000 <= t.value and t.value <= 0xBFFF) - asserts.assert_true(t.value in commonTags.keys() or t.value in runTags or is_mfg, - "Found a SupportedModes entry with invalid mode tag value!") if t.value == Clusters.RvcRunMode.Enums.ModeTag.kIdle: - idle_present = True + at_least_one_idle_mode_tag = True + count_of_idle_cleaning_or_mapping_mode_tags += 1 + if t.value == Clusters.RvcRunMode.Enums.ModeTag.kCleaning: - cleaning_present = True - asserts.assert_true(idle_present, "The Supported Modes does not have an entry of Idle(0x4000)") - asserts.assert_true(cleaning_present, "The Supported Modes does not have an entry of Cleaning(0x4001)") + at_least_one_cleaning_mode_tag = True + count_of_idle_cleaning_or_mapping_mode_tags += 1 + + if t.value == Clusters.RvcRunMode.Enums.ModeTag.kMapping: + count_of_idle_cleaning_or_mapping_mode_tags += 1 + + if count_of_idle_cleaning_or_mapping_mode_tags > 1: + asserts.fail("A ModeOptionsStruct entry includes more than one of the following " + "mode tags: Idle(0x4000), Cleaning(0x4001), Mapping(0x4002)!") + + asserts.assert_true(at_least_one_idle_mode_tag, + "The Supported Modes does not have an entry of Idle(0x4000)") + asserts.assert_true(at_least_one_cleaning_mode_tag, + "The Supported Modes does not have an entry of Cleaning(0x4001)") if self.check_pics("RVCRUNM.S.A0001"): self.print_step(3, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode in modes, "CurrentMode is not a supported mode!") - - if self.check_pics("RVCRUNM.S.A0003"): - self.print_step(4, "Read OnMode attribute") - on_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) - - logging.info("OnMode: %s" % (on_mode)) - asserts.assert_true(on_mode in modes or on_mode == NullValue, "OnMode is not a supported mode!") - - if self.check_pics("RVCRUNM.S.A0002"): - self.print_step(5, "Read StartUpMode attribute") - startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) - - logging.info("StartUpMode: %s" % (startup_mode)) - asserts.assert_true(startup_mode in modes or startup_mode == NullValue, "StartUpMode is not a supported mode!") + asserts.assert_true(current_mode in self.supported_modes_dut, "CurrentMode is not a supported mode!") if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index 20229d1b7dd00d..60afbef1b2b115 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -23,11 +23,17 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: +# --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: class TC_RVCRUNM_2_1(MatterBaseTest): + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.mode_ok = 0 + self.mode_fail = 0 + async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcRunMode return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) @@ -44,9 +50,6 @@ def pics_TC_RVCRUNM_2_1(self) -> list[str]: @async_test_body async def test_TC_RVCRUNM_2_1(self): - asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, - "PIXIT_ENDPOINT must be included on the command line in " - "the --int-arg flag as PIXIT_ENDPOINT:") asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, "PIXIT.RVCRUNM.MODE_CHANGE_OK must be included on the command line in " "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_OK:") @@ -54,9 +57,9 @@ async def test_TC_RVCRUNM_2_1(self): "PIXIT.RVCRUNM.MODE_CHANGE_FAIL must be included on the command line in " "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_FAIL:") - self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_OK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_FAIL'] + self.endpoint = self.matter_test_config.endpoint + self.mode_ok = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_OK'] + self.mode_fail = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") @@ -93,8 +96,7 @@ class CommonCodes(Enum): GENERIC_FAILURE = 0x02 INVALID_IN_MODE = 0x03 - rvcRunCodes = [code.value for code in Clusters.RvcRunMode.Enums.StatusCode - if code is not Clusters.RvcRunMode.Enums.StatusCode.kUnknownEnumValue] + rvcRunCodes = [code.value for code in Clusters.RvcRunMode.Enums.StatusCode] self.print_step(4, "Send ChangeToMode command with NewMode set to %d" % (old_current_mode)) @@ -102,9 +104,9 @@ class CommonCodes(Enum): asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") if self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE"): - asserts.assert_true(self.modefail in modes, - "The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.modefail)) - self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) + asserts.assert_true(self.mode_fail in modes, + "The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.mode_fail)) + self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.mode_fail)) input("Press Enter when done.\n") self.print_step(6, "Read CurrentMode attribute") @@ -112,15 +114,15 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.mode_fail)) - ret = await self.send_change_to_mode_cmd(newMode=self.modefail) + ret = await self.send_change_to_mode_cmd(newMode=self.mode_fail) st = ret.status is_mfg_code = st in range(0x80, 0xC0) is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or ( st == CommonCodes.INVALID_IN_MODE.value) or (st in rvcRunCodes) or is_mfg_code asserts.assert_true( - is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) + is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.mode_fail)) st_text_len = len(ret.statusText) asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) @@ -131,7 +133,7 @@ class CommonCodes(Enum): asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") - self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.modeok)) + self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.mode_ok)) input("Press Enter when done.\n") self.print_step(10, "Read CurrentMode attribute") @@ -139,18 +141,18 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(11, "Send ChangeToMode command with NewMode set to %d" % (self.modeok)) + self.print_step(11, "Send ChangeToMode command with NewMode set to %d" % (self.mode_ok)) - ret = await self.send_change_to_mode_cmd(newMode=self.modeok) + ret = await self.send_change_to_mode_cmd(newMode=self.mode_ok) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, - "Changing to mode %d must succeed due to the current state of the device" % (self.modeok)) + "Changing to mode %d must succeed due to the current state of the device" % (self.mode_ok)) self.print_step(12, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == self.modeok, + asserts.assert_true(current_mode == self.mode_ok, "CurrentMode doesn't match the argument of the successful ChangeToMode command!") self.print_step(13, "Send ChangeToMode command with NewMode set to %d" % (invalid_mode)) @@ -164,7 +166,7 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == self.modeok, "CurrentMode changed after failed ChangeToMode command!") + asserts.assert_true(current_mode == self.mode_ok, "CurrentMode changed after failed ChangeToMode command!") if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCRUNM_2_2.py b/src/python_testing/TC_RVCRUNM_2_2.py new file mode 100644 index 00000000000000..d6d0ac8acb7b5d --- /dev/null +++ b/src/python_testing/TC_RVCRUNM_2_2.py @@ -0,0 +1,182 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# This test requires several additional command line arguments. +# Run the test with +# --int-arg PIXIT.RVCRUNM.MODE_A: PIXIT.RVCRUNM.MODE_B: + + +def error_enum_to_text(error_enum): + try: + return f'{Clusters.RvcRunMode.Enums.ModeTag(error_enum).name} 0x{error_enum:02x}' + except AttributeError: + if error_enum == 0: + return "Success(0x00)" + elif error_enum == 0x1: + return "UnsupportedMode(0x01)" + elif error_enum == 0x2: + return "GenericFailure(0x02)" + elif error_enum == 0x3: + return "InvalidInMode(0x03)" + + raise AttributeError("Unknown Enum value") + + +class TC_RVCRUNM_2_2(MatterBaseTest): + + def __init__(self, *args): + super().__init__(*args) + self.endpoint = 0 + self.mode_a = 0 + self.mode_b = 0 + self.supported_run_modes = {} # these are the ModeOptionStructs + self.supported_run_modes_dut = [] + self.idle_mode_dut = 0 + + async def read_mod_attribute_expect_success(self, cluster, attribute): + return await self.read_single_attribute_check_success( + endpoint=self.endpoint, cluster=cluster, attribute=attribute) + + async def read_run_supported_modes(self) -> Clusters.Objects.RvcRunMode.Attributes.SupportedModes: + ret = await self.read_mod_attribute_expect_success( + Clusters.RvcRunMode, + Clusters.RvcRunMode.Attributes.SupportedModes) + return ret + + async def read_current_mode_with_check(self, expected_mode): + run_mode = await self.read_mod_attribute_expect_success( + Clusters.RvcRunMode, + Clusters.RvcRunMode.Attributes.CurrentMode) + asserts.assert_true(run_mode == expected_mode, + "Expected the current mode to be %i, got %i" % (expected_mode, run_mode)) + + async def send_change_to_mode_cmd(self, new_mode) -> Clusters.Objects.RvcRunMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=new_mode), + endpoint=self.endpoint) + return ret + + async def send_change_to_mode_with_check(self, new_mode, expected_error): + response = await self.send_change_to_mode_cmd(new_mode) + asserts.assert_true(response.status == expected_error, + "Expected a ChangeToMode response status of %s, got %s" % + (error_enum_to_text(expected_error), error_enum_to_text(response.status))) + + # Prints the instruction and waits for a user input to continue + def print_instruction(self, step_number, instruction): + self.print_step(step_number, instruction) + input("Press Enter when done.\n") + + def pics_TC_RVCRUNM_2_2(self) -> list[str]: + return ["RVCRUNM.S"] + + @async_test_body + async def test_TC_RVCRUNM_2_2(self): + + if 'PIXIT.RVCRUNM.MODE_A' not in self.matter_test_config.global_test_params or \ + 'PIXIT.RVCRUNM.MODE_B' not in self.matter_test_config.global_test_params: + asserts.fail("There are missing arguments to the `--int-arg` flag! " + "Make sure that all of these arguments are given to this flag: \n" + "PIXIT.RVCRUNM.MODE_A: \n" + "PIXIT.RVCRUNM.MODE_B:") + + self.endpoint = self.matter_test_config.endpoint + self.mode_a = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_A'] + self.mode_b = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_B'] + + asserts.assert_true(self.check_pics("RVCRUNM.S"), "RVCRUNM.S must be supported") + # I think that the following PICS should be listed in the preconditions section in the test plan as if either + # of these PICS is not supported, this test would not be useful. + asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") + asserts.assert_true(self.check_pics("RVCRUNM.S.C00.Rsp"), "RVCRUNM.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED"), + "RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED must be supported") + + # Starting the test steps + self.print_step(1, "Commissioning, already done") + + self.print_instruction(2, "Manually put the device in a RVC Run Mode cluster mode with " + "the Idle(0x4000) mode tag and in a device state that allows changing to either " + "of these modes: %i, %i" % (self.mode_a, self.mode_b)) + + self.print_step(3, "Read the RvcRunMode SupportedModes attribute") + supported_run_modes = await self.read_run_supported_modes() + for mode in supported_run_modes: + self.supported_run_modes[mode.mode] = mode + # Save the Mode field values as supported_run_modes_dut + self.supported_run_modes_dut.append(mode.mode) + + asserts.assert_false(self.mode_a == self.mode_b, + "PIXIT.RVCRUNM.MODE_A must be different from PIXIT.RVCRUNM.MODE_B") + + if self.mode_a not in self.supported_run_modes_dut or \ + self.mode_b not in self.supported_run_modes_dut: + asserts.fail("PIXIT.RVCRUNM.MODE_A and PIXIT.RVCRUNM.MODE_B must be valid supported modes.") + + for tag in self.supported_run_modes[self.mode_a].modeTags: + if tag.value == Clusters.RvcRunMode.Enums.ModeTag.kIdle: + asserts.fail("The mode chosen for PIXIT.RVCRUNM.MODE_A must not have the Idle(0x4000) mode tag.") + + for tag in self.supported_run_modes[self.mode_b].modeTags: + if tag.value == Clusters.RvcRunMode.Enums.ModeTag.kIdle: + asserts.fail("The mode chosen for PIXIT.RVCRUNM.MODE_B must not have the Idle(0x4000) mode tag.") + + self.print_step(4, "Read the RvcRunMode CurrentMode attribute") + current_run_mode = await self.read_mod_attribute_expect_success( + Clusters.RvcRunMode, + Clusters.RvcRunMode.Attributes.CurrentMode) + + # Save the value as idle_mode_dut + self.idle_mode_dut = current_run_mode + + # Verify that the supported_run_modes_dut entry matching idle_mode_dut has the Idle (0x4000) mode tag. + idle_tag_present = False + for t in self.supported_run_modes[current_run_mode].modeTags: + if t.value == Clusters.RvcRunMode.Enums.ModeTag.kIdle: + idle_tag_present = True + asserts.assert_true(idle_tag_present, "The device must be in a mode with the Idle (0x4000) mode tag.") + + self.print_step(5, "Send ChangeToMode MODE_A command") + await self.send_change_to_mode_with_check(self.mode_a, 0) + # This step is not described in the test plan, but it ought to be + await self.read_current_mode_with_check(self.mode_a) + + self.print_step(6, "Send ChangeToMode MODE_B command") + await self.send_change_to_mode_with_check(self.mode_b, 3) + + self.print_step(7, "Send ChangeToMode idle command") + await self.send_change_to_mode_with_check(self.idle_mode_dut, 0) + # This step is not described in the test plan, but it ought to be + await self.read_current_mode_with_check(self.idle_mode_dut) + + self.print_step(8, "Send ChangeToMode MODE_B command") + await self.send_change_to_mode_with_check(self.mode_b, 0) + # This step is not described in the test plan, but it ought to be + await self.read_current_mode_with_check(self.mode_b) + + self.print_step(9, "Send ChangeToMode idle command") + await self.send_change_to_mode_with_check(self.idle_mode_dut, 0) + # This step is not described in the test plan, but it ought to be + await self.read_current_mode_with_check(self.idle_mode_dut) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 3ad4ef32b850de..c1b428dd930133 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -98155,75 +98155,47 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); - if (ShouldSkip(" !RVCCLEANM.S.F00 ")) { - NextTest(); - return; - } err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RVCCLEANM.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT\n"); - if (ShouldSkip("RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep4cThReadsTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT\n"); - if (ShouldSkip(" !RVCCLEANM.S.F00 ")) { - NextTest(); - return; - } - err = TestStep4cThReadsTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads from the DUT the EventList attribute.\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the EventList attribute.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads from the DUT the AcceptedCommandList attribute. Check if it contains id 0x0 (ChangeToMode)\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads from the DUT the AcceptedCommandList attribute. Check if it contains id 0x0 (ChangeToMode)\n"); if (ShouldSkip("RVCCLEANM.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_9(); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_6(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads from the DUT the GeneratedCommandList attribute. Check if it contains id 0x1 (ChangeToModeResponse)\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads from the DUT the GeneratedCommandList attribute. Check if it contains id 0x1 (ChangeToModeResponse)\n"); if (ShouldSkip("RVCCLEANM.S.C01.Tx")) { NextTest(); return; } - err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_10(); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_7(); break; } @@ -98260,15 +98232,6 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -98279,7 +98242,7 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -98350,30 +98313,7 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set: Error: %@", err); - } else { - NSLog(@"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98405,7 +98345,7 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98436,57 +98376,7 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT: Error: %@", err); - } else { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4cThReadsTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT: Error: %@", err); - } else { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_9() + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98515,7 +98405,7 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_10() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98594,76 +98484,48 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads from the DUT the FeatureMap attribute.\n"); - if (ShouldSkip(" !RVCRUNM.S.F00 ")) { - NextTest(); - return; - } - err = TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RVCRUNM.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bGivenRvcrunmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT\n"); - if (ShouldSkip("RVCRUNM.S.F00")) { - NextTest(); - return; - } - err = TestStep4cThReadsTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT\n"); - if (ShouldSkip(" !RVCRUNM.S.F00 ")) { - NextTest(); - return; - } - err = TestStep4dThReadsTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads from the DUT the EventList attribute.\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the EventList attribute.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads from the DUT the AcceptedCommandList attribute. Check if it contains id 0x0 (ChangeToMode)\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads from the DUT the AcceptedCommandList attribute. Check if it contains id 0x0 (ChangeToMode)\n"); if (ShouldSkip("RVCRUNM.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_9(); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_6(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads from the DUT the GeneratedCommandList attribute. Check if it contains id 0x1 (ChangeToModeResponse)\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads from the DUT the GeneratedCommandList attribute. Check if it contains id 0x1 (ChangeToModeResponse)\n"); if (ShouldSkip("RVCRUNM.S.C01.Tx")) { NextTest(); return; } - err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_10(); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_7(); break; } @@ -98700,15 +98562,6 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -98719,7 +98572,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -98762,7 +98615,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98771,9 +98624,9 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3a: TH reads from the DUT the FeatureMap attribute.: Error: %@", err); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute.: Error: %@", err); } else { - NSLog(@"Step 3a: TH reads from the DUT the FeatureMap attribute.: Success"); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute.: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98790,30 +98643,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenRvcrunmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set: Error: %@", err); - } else { - NSLog(@"Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98845,7 +98675,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98876,57 +98706,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT: Error: %@", err); - } else { - NSLog(@"Step 4c: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from the DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4dThReadsTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4d: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT: Error: %@", err); - } else { - NSLog(@"Step 4d: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList from the DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_9() + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttributeCheckIfItContainsId0x0ChangeToMode_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98955,7 +98735,7 @@ class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_10() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttributeCheckIfItContainsId0x1ChangeToModeResponse_7() { MTRBaseDevice * device = GetDevice("alpha"); From 28676c8d49e700bb8d8fc8bc6111ba2c56e0191f Mon Sep 17 00:00:00 2001 From: Axel Le Bourhis <45206070+axelnxp@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:17:34 +0100 Subject: [PATCH 33/45] [NXP] Initial enablement of NXP Matter over WiFi with Zephyr (#31648) * [zephyr] Update deprecated Kconfig CPLUSPLUS is deprecated and should be replaced with CPP LIB_CPLUSPLUS is deprecated and should be replaced with REQUIRES_FULL_LIBCPP Signed-off-by: Axel Le Bourhis * [NXP] Initial enablement of NXP Matter over WiFi with Zephyr Features: * Matter over WiFi * BLE commissioning * Storage * Factory data * OTA * MbedTLS PSA API Signed-off-by: Axel Le Bourhis * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Fix misspell error Signed-off-by: Axel Le Bourhis * Update copyrights to date contributed Signed-off-by: Axel Le Bourhis --------- Signed-off-by: Axel Le Bourhis Co-authored-by: Restyled.io --- config/nxp/README.md | 10 + config/nxp/app/bootloader.conf | 25 + config/nxp/app/enable-gnu-std.cmake | 22 + config/nxp/app/pre-zephyr.cmake | 21 + config/nxp/chip-gn/.gn | 29 + config/nxp/chip-gn/BUILD.gn | 40 + config/nxp/chip-gn/args.gni | 32 + config/nxp/chip-gn/toolchain/BUILD.gn | 34 + config/nxp/chip-module/CMakeLists.txt | 270 +++++++ config/nxp/chip-module/Kconfig | 258 +++++++ config/nxp/chip-module/Kconfig.defaults | 381 ++++++++++ config/nxp/chip-module/Kconfig.features | 74 ++ .../chip-module/generate_factory_data.cmake | 229 ++++++ config/nxp/chip-module/zephyr/module.yml | 22 + config/zephyr/Kconfig | 8 +- docs/guides/nxp_zephyr_ota_software_update.md | 205 ++++++ src/platform/BUILD.gn | 9 + src/platform/device.gni | 19 +- .../factory_data/FactoryDataProvider.cpp | 6 +- src/platform/nxp/zephyr/BLEManagerImpl.h | 26 + src/platform/nxp/zephyr/BUILD.gn | 111 +++ src/platform/nxp/zephyr/BlePlatformConfig.h | 27 + .../nxp/zephyr/CHIPDevicePlatformConfig.h | 220 ++++++ .../nxp/zephyr/CHIPDevicePlatformEvent.h | 26 + src/platform/nxp/zephyr/CHIPPlatformConfig.h | 141 ++++ .../nxp/zephyr/ConfigurationManagerImpl.h | 26 + .../nxp/zephyr/ConnectivityManagerImpl.cpp | 69 ++ .../nxp/zephyr/ConnectivityManagerImpl.h | 121 ++++ .../zephyr/DeviceInstanceInfoProviderImpl.cpp | 47 ++ .../zephyr/DeviceInstanceInfoProviderImpl.h | 43 ++ .../zephyr/DiagnosticDataProviderImplNxp.cpp | 157 ++++ .../zephyr/DiagnosticDataProviderImplNxp.h | 60 ++ .../nxp/zephyr/FactoryDataProviderImpl.cpp | 246 +++++++ .../nxp/zephyr/FactoryDataProviderImpl.h | 82 +++ src/platform/nxp/zephyr/InetPlatformConfig.h | 27 + .../nxp/zephyr/KeyValueStoreManagerImpl.h | 27 + src/platform/nxp/zephyr/PlatformManagerImpl.h | 25 + .../nxp/zephyr/SystemPlatformConfig.h | 27 + src/platform/nxp/zephyr/args.gni | 20 + .../nxp/zephyr/nxp-zephyr-mbedtls-config.h | 38 + .../nxp/zephyr/ota/OTAImageProcessorImpl.cpp | 174 +++++ .../nxp/zephyr/ota/OTAImageProcessorImpl.h | 54 ++ .../wifi/ConnectivityManagerImplWiFi.cpp | 178 +++++ .../zephyr/wifi/ConnectivityManagerImplWiFi.h | 80 ++ .../nxp/zephyr/wifi/NxpWifiDriver.cpp | 298 ++++++++ src/platform/nxp/zephyr/wifi/NxpWifiDriver.h | 112 +++ src/platform/nxp/zephyr/wifi/WiFiManager.cpp | 685 ++++++++++++++++++ src/platform/nxp/zephyr/wifi/WiFiManager.h | 253 +++++++ 48 files changed, 5079 insertions(+), 15 deletions(-) create mode 100644 config/nxp/README.md create mode 100644 config/nxp/app/bootloader.conf create mode 100644 config/nxp/app/enable-gnu-std.cmake create mode 100644 config/nxp/app/pre-zephyr.cmake create mode 100644 config/nxp/chip-gn/.gn create mode 100644 config/nxp/chip-gn/BUILD.gn create mode 100644 config/nxp/chip-gn/args.gni create mode 100644 config/nxp/chip-gn/toolchain/BUILD.gn create mode 100644 config/nxp/chip-module/CMakeLists.txt create mode 100644 config/nxp/chip-module/Kconfig create mode 100644 config/nxp/chip-module/Kconfig.defaults create mode 100644 config/nxp/chip-module/Kconfig.features create mode 100644 config/nxp/chip-module/generate_factory_data.cmake create mode 100644 config/nxp/chip-module/zephyr/module.yml create mode 100644 docs/guides/nxp_zephyr_ota_software_update.md create mode 100644 src/platform/nxp/zephyr/BLEManagerImpl.h create mode 100644 src/platform/nxp/zephyr/BUILD.gn create mode 100644 src/platform/nxp/zephyr/BlePlatformConfig.h create mode 100644 src/platform/nxp/zephyr/CHIPDevicePlatformConfig.h create mode 100644 src/platform/nxp/zephyr/CHIPDevicePlatformEvent.h create mode 100644 src/platform/nxp/zephyr/CHIPPlatformConfig.h create mode 100644 src/platform/nxp/zephyr/ConfigurationManagerImpl.h create mode 100644 src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp create mode 100644 src/platform/nxp/zephyr/ConnectivityManagerImpl.h create mode 100644 src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp create mode 100644 src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.h create mode 100644 src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp create mode 100644 src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.h create mode 100644 src/platform/nxp/zephyr/FactoryDataProviderImpl.cpp create mode 100644 src/platform/nxp/zephyr/FactoryDataProviderImpl.h create mode 100644 src/platform/nxp/zephyr/InetPlatformConfig.h create mode 100644 src/platform/nxp/zephyr/KeyValueStoreManagerImpl.h create mode 100644 src/platform/nxp/zephyr/PlatformManagerImpl.h create mode 100644 src/platform/nxp/zephyr/SystemPlatformConfig.h create mode 100644 src/platform/nxp/zephyr/args.gni create mode 100644 src/platform/nxp/zephyr/nxp-zephyr-mbedtls-config.h create mode 100644 src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp create mode 100755 src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.h create mode 100644 src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.cpp create mode 100644 src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.h create mode 100644 src/platform/nxp/zephyr/wifi/NxpWifiDriver.cpp create mode 100644 src/platform/nxp/zephyr/wifi/NxpWifiDriver.h create mode 100644 src/platform/nxp/zephyr/wifi/WiFiManager.cpp create mode 100644 src/platform/nxp/zephyr/wifi/WiFiManager.h diff --git a/config/nxp/README.md b/config/nxp/README.md new file mode 100644 index 00000000000000..e15ad309dc9d1a --- /dev/null +++ b/config/nxp/README.md @@ -0,0 +1,10 @@ +# NXP Zephyr build and configuration files + +This directory contains build scripts and common configuration files used by +CHIP NXP Zephyr applications. It is structured as follows: + +| File/Folder | Contents | +| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| chip-gn | GN project used to build selected CHIP libraries with the _nxp_zephyr_ platform integration layer | +| chip-module | CMake wrapper for the GN project defined in `chip-gn` directory, and other components that allow one to use CHIP as a Zephyr module | +| app | Common and optional Kconfig configuration files that can be used in NXP Zephyr applications | diff --git a/config/nxp/app/bootloader.conf b/config/nxp/app/bootloader.conf new file mode 100644 index 00000000000000..281e1145a89aa0 --- /dev/null +++ b/config/nxp/app/bootloader.conf @@ -0,0 +1,25 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Options to be used for MCUBOOT build are located on this file. + +# The default signature key used by MCUBOOT is located on their repository, +# change this to the appropriate one. +# NOTE: This option needs to contain a path to the same file used by +# MCUBOOT_SIGNATURE_KEY_FILE. +#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem" + +CONFIG_BOOT_MAX_IMG_SECTORS=2048 diff --git a/config/nxp/app/enable-gnu-std.cmake b/config/nxp/app/enable-gnu-std.cmake new file mode 100644 index 00000000000000..a5a5c6c6aca10f --- /dev/null +++ b/config/nxp/app/enable-gnu-std.cmake @@ -0,0 +1,22 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +add_library(gnu17 INTERFACE) +target_compile_options(gnu17 + INTERFACE + $<$:-std=gnu++17> + -D_SYS__PTHREADTYPES_H_) +target_link_libraries(app PRIVATE gnu17) diff --git a/config/nxp/app/pre-zephyr.cmake b/config/nxp/app/pre-zephyr.cmake new file mode 100644 index 00000000000000..9dd1b2ae32c5bf --- /dev/null +++ b/config/nxp/app/pre-zephyr.cmake @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. +# + +# Automatically find overlays defined at platform level +# Those are usually used to change FLASH and RAM layouts +if (EXISTS ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay) + list(APPEND EXTRA_DTC_OVERLAY_FILE ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay) +endif() diff --git a/config/nxp/chip-gn/.gn b/config/nxp/chip-gn/.gn new file mode 100644 index 00000000000000..0cc783dee91703 --- /dev/null +++ b/config/nxp/chip-gn/.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "zephyr" + + import("${chip_root}/config/nxp/chip-gn/args.gni") +} diff --git a/config/nxp/chip-gn/BUILD.gn b/config/nxp/chip-gn/BUILD.gn new file mode 100644 index 00000000000000..1fc09ec27d611a --- /dev/null +++ b/config/nxp/chip-gn/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +import("${chip_root}/build/chip/tests.gni") + +assert(current_os == "zephyr") + +declare_args() { + chip_build_example_providers = false +} + +group("nxp_zephyr") { + deps = [ "${chip_root}/src/lib" ] + + if (chip_build_tests) { + deps += [ "${chip_root}/src:tests" ] + } + + if (chip_build_example_providers) { + deps += [ "${chip_root}/examples/providers:device_info_provider" ] + } +} + +group("default") { + deps = [ ":nxp_zephyr" ] +} diff --git a/config/nxp/chip-gn/args.gni b/config/nxp/chip-gn/args.gni new file mode 100644 index 00000000000000..702e9537b4b74d --- /dev/null +++ b/config/nxp/chip-gn/args.gni @@ -0,0 +1,32 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/src/crypto/crypto.gni") + +chip_device_platform = "nxp_zephyr" + +chip_build_tests = false + +chip_project_config_include = "" +chip_system_project_config_include = "" +chip_ble_project_config_include = "" + +chip_crypto = "mbedtls" +chip_external_mbedtls = true + +custom_toolchain = "${chip_root}/config/nxp/chip-gn/toolchain:zephyr" + +pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ] diff --git a/config/nxp/chip-gn/toolchain/BUILD.gn b/config/nxp/chip-gn/toolchain/BUILD.gn new file mode 100644 index 00000000000000..0bee7f170cbd89 --- /dev/null +++ b/config/nxp/chip-gn/toolchain/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") + +declare_args() { + zephyr_ar = "" + zephyr_cc = "" + zephyr_cxx = "" +} + +gcc_toolchain("zephyr") { + ar = zephyr_ar + cc = zephyr_cc + cxx = zephyr_cxx + + toolchain_args = { + current_os = "zephyr" + is_clang = false + } +} diff --git a/config/nxp/chip-module/CMakeLists.txt b/config/nxp/chip-module/CMakeLists.txt new file mode 100644 index 00000000000000..0e35f27a44d153 --- /dev/null +++ b/config/nxp/chip-module/CMakeLists.txt @@ -0,0 +1,270 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 +# CMake sub-project defining 'chip' target which represents CHIP library +# and other optional libraries like unit tests, built with 'nxp_zephyr' +# platform. +# Since CHIP doesn't provide native CMake support, ExternalProject +# module is used to build the required artifacts with GN meta-build +# system. It is assumed that find_package(Zephyr) has been called before +# including this file. +# + +if (CONFIG_CHIP) + +include(ExternalProject) +include(../../zephyr/ota-image.cmake) +include(../../zephyr/zephyr-util.cmake) +include(generate_factory_data.cmake) + +# ============================================================================== +# Prepare CHIP configuration based on the project Kconfig configuration +# ============================================================================== + +# Set paths + +if (NOT CHIP_ROOT) + get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +endif() +get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/nxp/chip-gn REALPATH) +get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH) + +# Get common Cmake sources + +include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake) +include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake) + +# Prepare compiler flags +if (CHIP_CFLAGS) + matter_add_flags("${CHIP_CFLAGS}") +endif() + +matter_add_cxxflags(-D_POSIX_C_SOURCE=200809) + +if (CONFIG_ARM) + matter_add_cflags(--specs=nosys.specs) +endif() + +if(CONFIG_MBEDTLS) + zephyr_include_directories($) + zephyr_compile_definitions($) +endif() + +zephyr_include_directories(${CHIP_ROOT}/src/platform/nxp/zephyr) + +zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) +matter_add_cflags("${ZEPHYR_CFLAGS_C}") +zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) +matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") +zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) +matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD}) + +# Set up custom OpenThread configuration + +if (CONFIG_CHIP_OPENTHREAD_CONFIG) + get_filename_component(CHIP_OPENTHREAD_CONFIG + ${CONFIG_CHIP_OPENTHREAD_CONFIG} + REALPATH + BASE_DIR ${CMAKE_SOURCE_DIR} + ) + zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG}) +endif() + +# Set up Zephyr symbol level + +if (NOT CONFIG_CHIP_DEBUG_SYMBOLS) + set_compiler_property(PROPERTY debug -g0) +endif() + +# Determine if ccache should be used + +get_property(CHIP_COMPILER_LAUNCHER GLOBAL PROPERTY RULE_LAUNCH_COMPILE) + +# ============================================================================== +# Generate configuration for CHIP GN build system +# ============================================================================== + +matter_common_gn_args( + DEBUG CONFIG_DEBUG + LIB_SHELL CONFIG_CHIP_LIB_SHELL + LIB_TESTS CONFIG_CHIP_BUILD_TESTS + PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} + DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER +) +matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) +matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) +matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER}) +matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG) +matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD) +matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD) +matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT) +matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4) +matter_add_gn_arg_bool ("chip_persist_subscriptions" CONFIG_CHIP_PERSISTENT_SUBSCRIPTIONS) +matter_add_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TESTS) +matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) +matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) +matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3) +matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4) +matter_add_gn_arg_bool ("chip_automation_logging" FALSE) +matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP) +matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_CHIP_WIFI) +matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS) +matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT) +matter_add_gn_arg_bool ("enable_eventlist_attribute" TRUE) +matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR) + +if(CONFIG_DEBUG) + matter_add_gn_arg_bool("optimize_debug" true) + matter_add_gn_arg_string("optimize_debug_level" "0") + matter_add_gn_arg_string("symbol_level" "2") +endif() + +if (CONFIG_CHIP_FACTORY_DATA) + matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) + matter_add_gn_arg_bool("chip_enable_factory_data" TRUE) +elseif (CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) + matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) +endif() + +if (CONFIG_CHIP_ROTATING_DEVICE_ID) + matter_add_gn_arg_bool("chip_enable_rotating_device_id" TRUE) + matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE) +endif() + +if (CONFIG_NET_L2_OPENTHREAD) + matter_add_gn_arg_string("chip_mdns" "platform") +elseif(CONFIG_WIFI_NXP) + matter_add_gn_arg_string("chip_mdns" "minimal") +else() + matter_add_gn_arg_string("chip_mdns" "none") +endif() + +if (CONFIG_CHIP_CRYPTO_PSA) + matter_add_gn_arg_string("chip_crypto" "psa") +endif() + +# if (BOARD STREQUAL "native_posix") +# matter_add_gn_arg_string("target_cpu" "x86") +# elseif (BOARD STREQUAL "native_posix_64") +# matter_add_gn_arg_string("target_cpu" "x64") +# endif() + +if (NOT CONFIG_CHIP_DEBUG_SYMBOLS) + matter_add_gn_arg_string("symbol_level" "0") +endif() + +# if (CHIP_COMPILER_LAUNCHER) +# matter_add_gn_arg_string("pw_command_launcher" ${CHIP_COMPILER_LAUNCHER}) +# endif() + +# if (CONFIG_CHIP_PW_RPC) +# set(PIGWEED_DIR "//third_party/pigweed/repo") +# matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend) +# matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic) +# matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"]) +# endif() + +matter_generate_args_tmp_file() + +# ============================================================================== +# Build chip library +# ============================================================================== + +matter_build(chip + LIB_SHELL ${CONFIG_CHIP_LIB_SHELL} + LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS} + DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER} + GN_DEPENDENCIES kernel +) + +set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) +# Enable visibility of POSIX.1-2008 functions, such as strnlen +target_compile_definitions(chip INTERFACE _POSIX_C_SOURCE=200809) +# Make sure that kernel symbols that are only referenced by the Matter libraries are resolved. +target_link_libraries(chip INTERFACE $) + +if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE) + target_link_options(chip INTERFACE + -Wl,--wrap=malloc + -Wl,--wrap=calloc + -Wl,--wrap=realloc + -Wl,--wrap=free + -Wl,--wrap=_malloc_r + -Wl,--wrap=_calloc_r + -Wl,--wrap=_realloc_r + -Wl,--wrap=_free_r + ) +endif() + +# ============================================================================== +# Define 'chip-ota-image' target for building CHIP OTA image +# ============================================================================== +if(EXISTS "${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay") + set(DTC_BOARD_OVERLAY "${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay") +else() + set(DTC_BOARD_OVERLAY "") + message(STATUS "No board overlay found") +endif() + +if (CONFIG_CHIP_OTA_REQUESTOR) + if(CONFIG_MCUBOOT_SIGNATURE_KEY_FILE STREQUAL "") + set(ZEPHYR_OUTPUT_NAME "zephyr") + else() + set(ZEPHYR_OUTPUT_NAME "zephyr.signed") + endif() + + set(GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/nxp/app/bootloader.conf") + + add_custom_target(build_mcuboot ALL + COMMAND + west build -b ${BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr + -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DEXTRA_DTC_OVERLAY_FILE=${DTC_BOARD_OVERLAY} + COMMAND + cp ${PROJECT_BINARY_DIR}/../modules/connectedhomeip/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin + ) + + set(BLOCK_SIZE "1024") + dt_nodelabel(dts_partition_path NODELABEL "boot_partition") + dt_reg_size(mcuboot_size PATH ${dts_partition_path}) + math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) + + add_custom_target(merge_mcuboot ALL + COMMAND + dd if=${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin of=${PROJECT_BINARY_DIR}/zephyr_full.bin + COMMAND + dd if=${PROJECT_BINARY_DIR}/${ZEPHYR_OUTPUT_NAME}.bin of=${PROJECT_BINARY_DIR}/zephyr_full.bin bs=${BLOCK_SIZE} seek=${boot_blocks} + ) + add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE}) + + if (CONFIG_CHIP_OTA_IMAGE_BUILD) + chip_ota_image(chip-ota-image + INPUT_FILES ${PROJECT_BINARY_DIR}/${ZEPHYR_OUTPUT_NAME}.bin + OUTPUT_FILE ${PROJECT_BINARY_DIR}/${CONFIG_CHIP_OTA_IMAGE_FILE_NAME} + ) + endif() +endif() + +# ============================================================================== +# Define 'factory_data' target for generating a factory data partition +# ============================================================================== + +if (CONFIG_CHIP_FACTORY_DATA_BUILD) + nxp_generate_factory_data() +endif() + +endif() # CONFIG_CHIP diff --git a/config/nxp/chip-module/Kconfig b/config/nxp/chip-module/Kconfig new file mode 100644 index 00000000000000..88918a67450ad3 --- /dev/null +++ b/config/nxp/chip-module/Kconfig @@ -0,0 +1,258 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. +# + +rsource "../../zephyr/Kconfig" + +if CHIP + +config CHIP_NXP_PLATFORM + bool + default y + help + States that the configuration uses Matter NXP platform, + what can be used to conditionally deviate from Zephyr generic configuration + for NXP platform related purposes. + +# See config/zephyr/Kconfig for full definition +config CHIP_DEVICE_VENDOR_NAME + default "NXP Semiconductors" + +config CHIP_APP_LOG_LEVEL + int "Logging level in application" + default LOG_DEFAULT_LEVEL + depends on LOG + help + Sets the logging level in the Matter application. Use this configuration + option only within the application. To set the logging level for the + Matter stack, use the MATTER_LOG_LEVEL configuration option. + +config CHIP_EXAMPLE_DEVICE_INFO_PROVIDER + bool "Include default device information provider build" + default y + +config CHIP_DEBUG_SYMBOLS + bool "Generate debug symbols" + default y + help + Enables building the application with debug symbols. + +config CHIP_MALLOC_SYS_HEAP + default y if !ARCH_POSIX + +config CHIP_FACTORY_DATA + bool "Factory data provider" + help + Enables the default NXP factory data provider implementation that + supports reading the factory data encoded in the KLV format from the + flash memory partition. This option requires a fixed partition named + "factory_partition" declared on the device tree. Factory data partition + can be generated during build process, see CHIP_FACTORY_DATA_BUILD Kconfig. + +config CHIP_FACTORY_DATA_CUSTOM_BACKEND + bool "Custom factory data provider" + depends on !CHIP_FACTORY_DATA + help + Enables user's custom factory data provider implementation. This option + cannot be used with the CHIP_FACTORY_DATA, which enables the default NXP + factory data provider implementation. + +config CHIP_FACTORY_DATA_BUILD + bool "Generate factory data contents" + default n + imply CHIP_FACTORY_DATA + help + Enables generation of the factory data contents during the building. This + option requires a fixed partition named "factory_partition" declared on the + device tree. + +config CHIP_FACTORY_DATA_VERSION + int + default 1 + help + Provides the version of the generated factory data parameter set. This is + a hidden configuration option that the user cannot change. You can use + this value in the factory data provider implementation to verify that the + factory data saved in the flash memory has the expected version. + +config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN + int "Maximum length of rotating device ID unique ID in bytes" + default 16 + depends on CHIP_FACTORY_DATA + help + Maximum acceptable length of rotating device ID unique ID in bytes. + +if CHIP_FACTORY_DATA + +config CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY + string "AES128 key used to encrypt factory data." + default "2B7E151628AED2A6ABF7158809CF4F3C" + help + AES128 key used to encrypt factory data. + +config CHIP_ENCRYPTED_FACTORY_DATA + bool "Encrypt factory data with AES128 ECB." + default y + help + If enabled, the factory data partition will be encrypted with AES128 ECB. + +config CHIP_DEVICE_PRODUCT_URL + string "Product URL" + help + Provides the URL to the product page. The URL is exposed as an attribute + of the Basic Information cluster. + +config CHIP_DEVICE_PRODUCT_LABEL + string "Product label" + help + Provides the product label. The label is exposed as an attribute + of the Basic Information cluster. + +config CHIP_DEVICE_PART_NUMBER + string "Part number" + help + Provides the part number. The part number is exposed as an attribute + of the Basic Information cluster. + +endif + +if CHIP_FACTORY_DATA_BUILD + +# Factory data definitions +config CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES + bool "Generate onboarding codes during the generation of a factory data set" + help + Enables generation of onboarding codes (manual pairing code and QR code) + during the generation of a factory data set. You can provide the + onboarding codes a Matter controller to commission a device to a Matter + network. + +# Select source of the certificates +choice CHIP_FACTORY_DATA_CERT_SOURCE + prompt "Attestation certificate file source" + default CHIP_FACTORY_DATA_USE_DEFAULT_CERTS + + config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS + bool "Use pre-generated development certificates" + help + Uses pre-generated certificate files from the + credentials/development/attestation/ directory that match the + configured Product ID. This can be used for development purpose. + + config CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED + bool "Auto-generate certificates" + help + Generates new certificates instead of using pre-generated ones. The + certificates are generated on every build. + + config CHIP_FACTORY_DATA_CERT_SOURCE_USER + bool "Use user-provided certificate files" + help + Uses user-provided certificate files. The user needs to specify the + absolute paths to all necessary files. + +endchoice + +if CHIP_FACTORY_DATA_CERT_SOURCE_USER + +config CHIP_FACTORY_DATA_USER_CERTS_CD_CERT + string "Path to the CD certificate (DER format)" + help + Provides the absolute path to the CD certificate file in the DER format. + +config CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT + string "Path to the DAC certificate (DER format)" + help + Provides the absolute path to the DAC certificate file in the DER format. + +config CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY + string "Path to the DAC private key (DER format)" + help + Provides the absolute path to the DAC keypair file in the DER format. Both + public and private keys must be present (the private key will be extracted + automatically). + +config CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT + string "Path to the PAI certificate (DER format)" + help + Provides the absolute path to the PAI certificate in the DER format. +endif + +# Configs for SPAKE2+ generation +config CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER + bool "Generate SPAKE2+ verifier" + help + Enables the generation of the SPAKE2+ verifier for the configured SPAKE2+ + passcode, iteration count and salt. + +config CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID + bool "Generate Rotating device ID unique ID" + default y + help + Enables the generation of a random Rotating device ID unique ID. + +endif #CHIP_FACTORY_DATA_BUILD + +# See config/zephyr/Kconfig for full definition +config CHIP_FACTORY_RESET_ERASE_NVS + bool + default y if CHIP_FACTORY_DATA || CHIP_FACTORY_DATA_CUSTOM_BACKEND + +endif + +config CHIP_LOG_SIZE_OPTIMIZATION + bool "Disable some detailed logs to decrease flash usage" + help + Disables some log levels for specific Matter log modules that provide + information that is too detailed to be used in most cases. You can find + full configuration enabled by this option in the + platform/nxp/CHIPPlatformConfig.h file. + +config CHIP_IPV4 + bool "IPv4 support for Matter" + default n + depends on NET_IPV4 + help + If disabled, it allows to build NXP SDK application + with IPv4 support independently of the Matter stack still + running over IPv6. + +config CHIP_OTA_REQUESTOR + bool + select BOOTLOADER_MCUBOOT + +config BOOTLOADER_MCUBOOT + bool + select IMG_MANAGER + select STREAM_FLASH + select STREAM_FLASH_ERASE + +config CHIP_OTA_REQUESTOR_BUFFER_SIZE + int "OTA Requestor image buffer size" + default 256 + depends on CHIP_OTA_REQUESTOR + help + Configures the size of the buffer used by OTA Requestor when downloading + and writing a new firmware image to flash. + +config CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY + bool "Auto-reboot when firmware update is applied" + default y + depends on CHIP_OTA_REQUESTOR + imply REBOOT + help + Reboots the device automatically after downloading a new firmware update + to swap the old and the new firmware images. The reboot happens only when + a user consents to apply the firmware update. diff --git a/config/nxp/chip-module/Kconfig.defaults b/config/nxp/chip-module/Kconfig.defaults new file mode 100644 index 00000000000000..56c82e3752900c --- /dev/null +++ b/config/nxp/chip-module/Kconfig.defaults @@ -0,0 +1,381 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. +# + +# The purpose of this file is to define new default values of settings used when building Matter samples. +# This file only changes defaults and thus all symbols here must be promptless +# and safeguarded so that they only are applied when building Matter. + +if CHIP + +config CHIP_OPERATIONAL_TIME_SAVE_INTERVAL + default 1 + +if CHIP_FACTORY_DATA + +config CHIP_DEVICE_VENDOR_ID + default 4151 # 0x1037 + +config CHIP_DEVICE_MANUFACTURING_DATE + default "2023-01-01" + +config CHIP_DEVICE_PRODUCT_ID + default 41510 if SOC_SERIES_RW6XX + +endif # CHIP_FACTORY_DATA + +config LOG + default y + +if LOG + +choice LOG_MODE + default LOG_MODE_MINIMAL +endchoice + +choice MATTER_LOG_LEVEL_CHOICE + default MATTER_LOG_LEVEL_DBG +endchoice + +config CHIP_APP_LOG_LEVEL + default 4 # debug + +config LOG_DEFAULT_LEVEL + default 1 # error + +config CHIP_LOG_SIZE_OPTIMIZATION + default y + +endif + +config PRINTK_SYNC + default y + +config ASSERT + default y + +config ASSERT_NO_COND_INFO + default y + +config ASSERT_NO_MSG_INFO + default y + +config HW_STACK_PROTECTION + default y + +config FPU + default y + +config SHELL + default y + +config PTHREAD_IPC + bool + default n + +config POSIX_MAX_FDS + int + default 16 + +# Application stack size +config MAIN_STACK_SIZE + default 8192 + +config INIT_STACKS + default y + +config NET_MGMT_EVENT_STACK_SIZE + default 2048 + +config NET_IPV6_MLD + default y + +config NET_IF_MCAST_IPV6_ADDR_COUNT + default 14 + +config NET_TC_TX_COUNT + default 1 + +config NET_TC_RX_COUNT + default 1 + +config NET_TC_THREAD_PRIO_CUSTOM + default y + +choice NET_TC_THREAD_TYPE + default NET_TC_THREAD_PREEMPTIVE +endchoice + +config NET_TCP_WORK_QUEUE_THREAD_PRIO + default -16 + +config NET_TC_TX_THREAD_BASE_PRIO + default 3 + +config NET_TC_RX_THREAD_BASE_PRIO + default 3 + +# Network buffers +config NET_PKT_RX_COUNT + default 16 + +config NET_PKT_TX_COUNT + default 16 + +config NET_BUF_RX_COUNT + default 60 + +config NET_BUF_TX_COUNT + default 80 + +config NET_BUF_DATA_SIZE + default 1700 + +# Bluetooth Low Energy configs + +config BT + default y + +config BT_PERIPHERAL + default y + +config BT_CENTRAL + default n + +config BT_PERIPHERAL_PREF_MIN_INT + default 36 + +config BT_PERIPHERAL_PREF_MAX_INT + default 36 + +# Increase BT timeout to 5 s to improve connection reliability and avoid fast drop outs. +config BT_PERIPHERAL_PREF_TIMEOUT + default 500 + +config BT_GAP_AUTO_UPDATE_CONN_PARAMS + default y + +# Decrease connection parameters update time, as some Matter controllers request +# enabling IP networking faster than BT connection parameters are updated, what may result +# in commissioning instabilities. +config BT_CONN_PARAM_UPDATE_TIMEOUT + default 1000 + +config BT_GATT_DYNAMIC_DB + default y + +config BT_DEVICE_NAME_DYNAMIC + default y + +config BT_DEVICE_NAME_MAX + default 15 + +config BT_MAX_CONN + default 1 + +config BT_L2CAP_TX_MTU + default 247 + +config BT_BUF_ACL_RX_SIZE + default 251 + +config BT_BUF_ACL_TX_SIZE + default 251 + +config BT_RX_STACK_SIZE + default 2048 if NO_OPTIMIZATIONS && DEBUG + default 1536 + +config BT_DEVICE_NAME_GATT_WRITABLE + bool + default n + +config HCI_NXP_ENABLE_AUTO_SLEEP + default n + +config CHIP_OTA_REQUESTOR + default n + +# Enable extended discovery +config CHIP_EXTENDED_DISCOVERY + default y + +config NVS_LOOKUP_CACHE + default y + +config NVS_LOOKUP_CACHE_SIZE + default 512 + +if CHIP_WIFI + +choice SCHED_ALGORITHM + default SCHED_MULTIQ +endchoice + +choice LIBC_IMPLEMENTATION + default NEWLIB_LIBC +endchoice + +choice WPA_SUPP_LOG_LEVEL_CHOICE + default WPA_SUPP_LOG_LEVEL_ERR +endchoice + +config WPA_SUPP_THREAD_STACK_SIZE + default 6144 + +config SYSTEM_WORKQUEUE_STACK_SIZE + default 2048 + +# align these numbers to match the OpenThread config +config NET_IF_UNICAST_IPV6_ADDR_COUNT + default 6 + +config NET_IF_MCAST_IPV6_ADDR_COUNT + default 8 + +config NET_SOCKETS_POLL_MAX + default 4 + +# options managed by IP4/IP6 simultaneous support +# aligned here to match OpenThread config +config NET_MAX_ROUTERS + default 1 + +config NET_MAX_CONN + default 4 + +config SHELL_STACK_SIZE + default 2616 + +config HEAP_MEM_POOL_SIZE + default 65536 + +config CHIP_MALLOC_SYS_HEAP_SIZE + default 28672 # 28 kB + +endif + +# Configure MBEDTLS lib +config MBEDTLS + default y + +config MBEDTLS_CFG_FILE + default "config-tls-generic.h" + +config MBEDTLS_USER_CONFIG_ENABLE + default y + +config MBEDTLS_USER_CONFIG_FILE + default "nxp-zephyr-mbedtls-config.h" + +config MBEDTLS_ENTROPY_ENABLED + default y + +config MBEDTLS_ZEPHYR_ENTROPY + default y + +config MBEDTLS_ENABLE_HEAP + default y + +config MBEDTLS_HEAP_SIZE + default 15360 + +config MBEDTLS_CIPHER_AES_ENABLED + default y + +config MBEDTLS_CIPHER_CCM_ENABLED + default y + +config MBEDTLS_CTR_DRBG_ENABLED + default y + +config MBEDTLS_CIPHER_MODE_CBC_ENABLED + default y + +config MBEDTLS_ECP_C + default y + +config MBEDTLS_ECP_DP_SECP256R1_ENABLED + default y + +if CHIP_CRYPTO_PSA + +config MBEDTLS_PSA_CRYPTO_C + default y + +config WPA_SUPP_CRYPTO_MBEDTLS_PSA + default y if WPA_SUPP_CRYPTO + +endif + +config MCUX_ELS_PKC + default y if SOC_SERIES_RW6XX + +if MCUX_ELS_PKC + +config KSDK_MBEDTLS + default n + +config MCUX_PSA_CRYPTO_DRIVER_ELS_PKC + default y if MBEDTLS_PSA_CRYPTO_C + +config ENTROPY_GENERATOR + default y + +endif # MCUX_ELS_PKC + + +if SHELL + +config KERNEL_SHELL + default y + +config DEVICE_SHELL + default y + +config REBOOT + default y + +# Disable not used shell modules +config SHELL_WILDCARD + default n + +config SHELL_VT100_COLORS + default n + +config SHELL_STATS + default n + +config SENSOR_SHELL + default n + +config DATE_SHELL + default n + +config DEVMEM_SHELL + default n + +config MCUBOOT_SHELL + default n + +config FLASH_SHELL + default n + +endif # SHELL + +endif + +config NXP_FW_LOADER_MONOLITHIC + default y if NXP_FW_LOADER diff --git a/config/nxp/chip-module/Kconfig.features b/config/nxp/chip-module/Kconfig.features new file mode 100644 index 00000000000000..d8d194ccef2b41 --- /dev/null +++ b/config/nxp/chip-module/Kconfig.features @@ -0,0 +1,74 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. +# + +# The purpose of this file is to define Kconfig options enabling specific features. +# Feature options will define defaults for settings that are related to the specific feature. + +if CHIP + +config CHIP_WIFI + bool "Enable NXP Wi-Fi support" + default y + select WIFI + select WIFI_NXP + select WPA_SUPP + select WPA_SUPP_AP + select WPA_SUPP_WPS + select WPA_SUPP_WPA3 + select WPA_SUPP_CRYPTO_ENTERPRISE + imply MBEDTLS_ENTROPY_C + imply NET_STATISTICS + imply NET_PKT_TXTIME + imply NET_PKT_TIMESTAMP + imply NET_IPV6_ND # enable Neighbor Discovery to handle Router Advertisements + imply NET_IPV6_NBR_CACHE + imply NET_STATISTICS_IPV6 + imply NET_STATISTICS_USER_API + +config CHIP_WIFI_CONNECTION_RECOVERY_MINIMUM_INTERVAL + int "Define the minimum connection recovery time interval in milliseconds" + depends on CHIP_WIFI + default 500 + help + Specifies the minimum connection recovery interval (in milliseconds). + +config CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL + int "Define the maximum connection recovery time interval in milliseconds" + depends on CHIP_WIFI + default 3600000 # 1 hour + help + Specifies the maximum connection recovery interval (in milliseconds). + +config CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER + int "Define the maximum amount of connection recovery occurrences" + depends on CHIP_WIFI + default 0 + help + Specifies the maximum number of connection recovery attempts. + If set to 0, no limitation is applied and attempts + to recover the connection are performed indefinitely. + +config CHIP_WIFI_CONNECTION_RECOVERY_JITTER + int "Define the connection recovery jitter in milliseconds" + depends on CHIP_WIFI + default 2000 + help + Specifies the maximum connection recovery jitter interval (in milliseconds). + Once the wait time reaches the current maximum value (defined by CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL), + a random jitter interval is added to it to avoid periodicity. The random jitter is selected + within range [-JITTER; +JITTER]. + +endif # CHIP diff --git a/config/nxp/chip-module/generate_factory_data.cmake b/config/nxp/chip-module/generate_factory_data.cmake new file mode 100644 index 00000000000000..ea1e35a797ab78 --- /dev/null +++ b/config/nxp/chip-module/generate_factory_data.cmake @@ -0,0 +1,229 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. +# + +# Generate certificates based on factory data given via Kconfigs. +# +# This function creates a list of arguments for external script and then run it to generate certificates. +# +# During generation process a some file will be created in zephyr's build directory: +# - Chip-PAI-NXP---Cert.der +# - Chip-PAI-NXP---Key.der +# - Chip-DAC-NXP---Cert.der +# - Chip-DAC-NXP---Key.der +# +# [Args]: +# script_path - a path to script that generates the certificates. +# output_path - a path to output directory, where generated certificates will be stored. +function(nxp_generate_certs script_path output_path) + if(NOT EXISTS ${CHIP_ROOT}/out/chip-cert) + message(FATAL_ERROR "Couldn't find chip-cert in ${CHIP_ROOT}/out folder. + Run following command from ${CHIP_ROOT} to build it: + gn gen out + ninja -C out chip-cert") + endif() + + # generate all script arguments + set(script_args) + string(APPEND script_args "--gen_cd\n") + string(APPEND script_args "--cd_type \"1\"\n") + string(APPEND script_args "--chip_cert_path ${CHIP_ROOT}/out/chip-cert\n") + string(APPEND script_args "--vendor_id ${CONFIG_CHIP_DEVICE_VENDOR_ID}\n") + string(APPEND script_args "--product_id ${CONFIG_CHIP_DEVICE_PRODUCT_ID}\n") + string(APPEND script_args "--vendor_name \"${CONFIG_CHIP_DEVICE_VENDOR_NAME}\"\n") + string(APPEND script_args "--product_name \"${CONFIG_CHIP_DEVICE_PRODUCT_NAME}\"\n") + string(APPEND script_args "--device_type \"${CONFIG_CHIP_DEVICE_TYPE}\"\n") + string(APPEND script_args "--output \"${output_path}\"\n") + + # convert decimal VID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_VID "${CONFIG_CHIP_DEVICE_VENDOR_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_VID} 2 -1 raw_vid) + string(TOUPPER ${raw_vid} raw_vid_upper) + + # convert decimal PID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_PID} 2 -1 raw_pid) + string(TOUPPER ${raw_pid} raw_pid_upper) + + # execute the script which can generate the certificates + separate_arguments(separated_script_args NATIVE_COMMAND ${script_args}) + add_custom_command( + OUTPUT + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.pem + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.pem + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.pem + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.pem + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.der + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.der + DEPENDS ${script_path} + COMMAND ${Python3_EXECUTABLE} ${script_path} ${separated_script_args} + COMMENT "Generating new certificates..." + ) + add_custom_target(chip-certificates ALL + DEPENDS + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.pem + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.pem + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.pem + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.pem + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der + ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.der + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der + ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.der + ) +endfunction() + +# Create a .bin file with factory data in KLV format. +# +# This function creates a .bin file from given Kconfig. +# +# During generation process, following files will be created in zephyr's build directory: +# - .bin a binary file containing all raw factory data in KLV format. +# +# [Args]: +# script_path - a path to script that makes a factory data .bin file from given arguments. +# output_path - a path to output directory, where created bin file will be stored. +function(nxp_generate_factory_data_bin script_path output_path) + if(NOT EXISTS ${CHIP_ROOT}/out/spake2p) + message(FATAL_ERROR "Couldn't find spake2p in ${CHIP_ROOT}/out folder. + Run following command from ${CHIP_ROOT} to build it: + gn gen out + ninja -C out spake2p") + endif() + + # convert decimal VID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_VID "${CONFIG_CHIP_DEVICE_VENDOR_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_VID} 2 -1 raw_vid) + string(TOUPPER ${raw_vid} raw_vid_upper) + + # convert decimal PID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_PID} 2 -1 raw_pid) + string(TOUPPER ${raw_pid} raw_pid_upper) + + # generate all script arguments + set(script_args) + string(APPEND script_args "--it \"${CONFIG_CHIP_DEVICE_SPAKE2_IT}\"\n") + string(APPEND script_args "--salt \"${CONFIG_CHIP_DEVICE_SPAKE2_SALT}\"\n") + string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n") + string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n") + string(APPEND script_args "--vid ${CONFIG_CHIP_DEVICE_VENDOR_ID}\n") + string(APPEND script_args "--pid ${CONFIG_CHIP_DEVICE_PRODUCT_ID}\n") + string(APPEND script_args "--vendor_name \"${CONFIG_CHIP_DEVICE_VENDOR_NAME}\"\n") + string(APPEND script_args "--product_name \"${CONFIG_CHIP_DEVICE_PRODUCT_NAME}\"\n") + string(APPEND script_args "--hw_version ${CONFIG_CHIP_DEVICE_HARDWARE_VERSION}\n") + string(APPEND script_args "--hw_version_str \"${CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING}\"\n") + string(APPEND script_args "--spake2p_path \"${CHIP_ROOT}/out/spake2p\"\n") + string(APPEND script_args "--serial_num \"${CONFIG_CHIP_DEVICE_SERIAL_NUMBER}\"\n") + string(APPEND script_args "--date \"${CONFIG_CHIP_DEVICE_MANUFACTURING_DATE}\"\n") + string(APPEND script_args "--unique_id \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n") + string(APPEND script_args "--product_finish ${CONFIG_CHIP_DEVICE_PRODUCT_FINISH}\n") + string(APPEND script_args "--product_url ${CONFIG_CHIP_DEVICE_PRODUCT_URL}\n") + string(APPEND script_args "--product_label ${CONFIG_CHIP_DEVICE_PRODUCT_LABEL}\n") + string(APPEND script_args "--part_number ${CONFIG_CHIP_DEVICE_PART_NUMBER}\n") + string(APPEND script_args "--out \"${output_path}/factory_data.bin\"\n") + + # for development purpose user can use default certs instead of generating or providing them + if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS) + # all certs are located in ${CHIP_ROOT}/credentials/development/attestation + # it can be used during development without need to generate new certifications + set(cd_cert ${CHIP_ROOT}/credentials/development/cd-certs/Chip-Test-CD-Cert.der) + set(dac_cert ${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Cert.der) + set(dac_key ${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Key.der) + set(pai_cert ${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-${raw_vid_upper}-noPID-Cert.der) + elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER) + set(cd_cert ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_CD_CERT}) + set(dac_cert ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT}) + set(dac_key ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY}) + set(pai_cert ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT}) + elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED) + set(cd_cert ${output_path}/Chip-Test-CD-${raw_vid_upper}-${raw_pid_upper}.der) + set(dac_cert ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der) + set(dac_key ${output_path}/Chip-DAC-NXP-${raw_vid_upper}-${raw_pid_upper}-Key.der) + set(pai_cert ${output_path}/Chip-PAI-NXP-${raw_vid_upper}-${raw_pid_upper}-Cert.der) + else() + message(FATAL_ERROR "Either CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS or CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER + or CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED must be defined. + See ${CHIP_ROOT}/config/nxp/chip-module/Kconfig for details.") + endif() + + string(APPEND script_args "--cert_declaration \"${cd_cert}\"\n") + string(APPEND script_args "--dac_cert \"${dac_cert}\"\n") + string(APPEND script_args "--dac_key \"${dac_key}\"\n") + string(APPEND script_args "--pai_cert \"${pai_cert}\"\n") + + # check if spake2 verifier should be generated using script + if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER) + # Spake2 verifier should be provided using Kconfig + string(APPEND script_args "--spake2p_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n") + endif() + + if(CONFIG_CHIP_ENCRYPTED_FACTORY_DATA) + if(NOT CONFIG_CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY) + message(FATAL_ERROR "CONFIG_CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY is required when using CONFIG_CHIP_ENCRYPTED_FACTORY_DATA !") + endif() + + string(APPEND script_args "--aes128_key \"${CONFIG_CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY}\"\n") + endif() + + if(CONFIG_CHIP_DEVICE_PRODUCT_COLOR) + string(APPEND script_args "--product_primary_color ${CONFIG_CHIP_DEVICE_PRODUCT_COLOR}\n") + endif() + + # execute the script which can generate the factory_data.bin file + separate_arguments(separated_script_args NATIVE_COMMAND ${script_args}) + add_custom_command( + OUTPUT ${output_path}/factory_data.bin + DEPENDS ${script_path} + COMMAND ${Python3_EXECUTABLE} ${script_path} ${separated_script_args} + COMMENT "Generating new Factory Data..." + ) + add_custom_target(factory_data ALL + DEPENDS ${output_path}/factory_data.bin + ) + + if(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED) + # Make sure certificates are generated before trying to generate factory data + add_dependencies(factory_data chip-certificates) + endif() +endfunction() + +# Generate factory data partition using given args +# +# During generation process a some file will be created in zephyr's build directory: +# - factory_data.bin: a raw binary file containing the factory data partition +# - CD, PAI, DEC certificates if CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED is set +# +function(nxp_generate_factory_data) + find_package(Python REQUIRED) + + # CHIP_ROOT must be provided as a reference set all localization of scripts + if(NOT CHIP_ROOT) + message(FATAL_ERROR "CHIP_ROOT variable is not set, please add it to CMakeLists.txt file") + endif() + + # Localize all scripts needed to generate factory data partition + set(GENERATE_CERTS_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nxp/generate_certs.py) + set(GENERATE_FDATA_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nxp/factory_data_generator/generate.py) + set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr) + + if(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED) + # Generate certificates + nxp_generate_certs(${GENERATE_CERTS_SCRIPT_PATH} ${OUTPUT_FILE_PATH}) + endif() + + nxp_generate_factory_data_bin(${GENERATE_FDATA_SCRIPT_PATH} ${OUTPUT_FILE_PATH}) +endfunction() diff --git a/config/nxp/chip-module/zephyr/module.yml b/config/nxp/chip-module/zephyr/module.yml new file mode 100644 index 00000000000000..870b1a37e35231 --- /dev/null +++ b/config/nxp/chip-module/zephyr/module.yml @@ -0,0 +1,22 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: connectedhomeip +build: + cmake: . + kconfig: Kconfig + depends: + - openthread diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index bd4b52ecb7a193..8df6c418aa42e3 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -17,12 +17,12 @@ menuconfig CHIP bool "Matter protocol stack" default n - select CPLUSPLUS - imply LIB_CPLUSPLUS + select CPP + imply REQUIRES_FULL_LIBCPP imply REQUIRES_FULL_LIBC imply NEWLIB_LIBC_NANO imply CBPRINTF_LIBC_SUBSTS - imply POSIX_API if !ARCH_POSIX && !CHIP_NRF_PLATFORM + imply POSIX_API if !ARCH_POSIX && !CHIP_NRF_PLATFORM && !CHIP_NXP_PLATFORM imply EVENTFD if !ARCH_POSIX imply REBOOT imply ENTROPY_GENERATOR @@ -30,7 +30,7 @@ menuconfig CHIP imply NET_IPV6 imply NET_CONFIG_NEED_IPV6 imply NET_SOCKETS - imply NET_SOCKETS_POSIX_NAMES if !ARCH_POSIX && CHIP_NRF_PLATFORM + imply NET_SOCKETS_POSIX_NAMES if !ARCH_POSIX && (CHIP_NRF_PLATFORM || CHIP_NXP_PLATFORM) imply NETWORKING imply HWINFO imply FLASH diff --git a/docs/guides/nxp_zephyr_ota_software_update.md b/docs/guides/nxp_zephyr_ota_software_update.md new file mode 100644 index 00000000000000..430e0bfd81e694 --- /dev/null +++ b/docs/guides/nxp_zephyr_ota_software_update.md @@ -0,0 +1,205 @@ +# Matter Over-The-Air Software Update with NXP using Zephyr example applications + +## Overview + +The OTA Requestor feature enables the device to be informed of, download and +apply a software update from an OTA Provider. + +This section explains how to perform an OTA Software Update with NXP platform +using NXP/Zephyr SDK. Throughout this guide, the all-clusters application is +used as an example. + +In general, the Over-The-Air Software Update process consists of the following +steps : + +- The OTA Requestor queries an update image from the OTA Provider which + responds according to its availability. +- The update image is received in blocks and stored in the external flash of + the device. +- Once the update image is fully downloaded, the bootloader is notified and + the device resets applying the update in test-mode. +- If the test is successful, the update is applied permanently. Otherwise, the + bootloader reverts back to the primary application, preventing any + downgrade. + +### Flash Memory Layout + +The Flash is divided into different regions as follow : + +- Bootloader : MCUBoot resides at the base of the flash. +- Primary application partition : The example application which would be run + by the bootloader (active application). +- Secondary application partition : Update image received with the OTA + (candidate application). + +The size reserved for each partition can be found in +`src/platform/nxp/zephyr/boards/board.overlay`. + +Notes : + +- When applicable, BLE/15.4/Wi-Fi firmware are embedded in the application + binary, ensuring compatibility between the application and the controllers. +- The sizes of the primary and secondary applications are provided as an + example. The size can be changed by overriding the partitions located at + `board.overlay`.(example: + `src/platform/nxp/zephyr/boards/rd_rw612_bga.overlay`) + +### MCUBoot Bootloader + +Current OTA solution is using MCUBoot Bootloader. MCUBoot is an open-source +secure bootloader used to apply the self-upgrade. For more details, please refer +to the +[MCUBoot documentation](https://github.com/mcu-tools/mcuboot/blob/main/docs/design.md). + +In our use case, the bootloader runs the application residing in the primary +partition. In order to run the OTA update image, the bootloader will swap the +content of the primary and the secondary partitions. This type of upgrade is +called swap-move and is the default upgrade configured by MCUBoot. + +## OTA Software Update process + +### Generating and flashing application image + +The all cluster app is able to demonstrate the usage of OTA. To have this OTA +support, prj_ota.conf configurations needs to be used. This can be done by +adding `-DEXTRA_CONF_FILE=prj_ota.conf` to the west build command. + +Current OTA implementation automates the following procedures: + +- Generation of MCUBOOT image (File generated: + `modules/connectedhomeip/build_mcuboot/zephyr/zephyr.bin`)\* +- Generation of Matter application image (File generated: + `zephyr/zephyr.bin`)\* +- Signature of the application image (File generated: + `zephyr/zephyr.signed.bin`)\* +- Generation of a single binary merging the signed application with the + MCUBoot Image (File generated: `zephyr/zephyr_full.bin`)\* + +> **Note**: \*All paths are relative to the output folder. + +The final binary to be used is `zephyr_full.bin`. + +The application image have the following format : + +- Header : contains general information about the image (version, size, + magic...) +- Code of the application : generated binary +- Trailer : contains metadata needed by the bootloader such as the image + signature, the upgrade type, the swap status... + +In the all-cluster-app example, the image is signed with the default private key +provided by MCUBoot(`/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem`). +MCUBoot is built with its corresponding public key which would be used to verify +the integrity of the image. It is possible to generate a new pair of keys using +the following commands. This procedure should be done prior to building the +mcuboot application. + +- To generate the private key : + +``` +user@ubuntu: python3 imgtool.py keygen -k priv_key.pem -t rsa-2048 +``` + +- To extract the public key : + +``` +user@ubuntu: python3 imgtool.py getpub -k priv_key.pem +``` + +To use a different key than the default one, `CONFIG_BOOT_SIGNATURE_KEY_FILE` +and `CONFIG_MCUBOOT_SIGNATURE_KEY_FILE` needs to point to that same key. + +- `CONFIG_BOOT_SIGNATURE_KEY_FILE`: This is used for the MCUboot bootloader + image. The path to the key can be either absolute or relative. Relative + paths starts from the MCUBoot repository root. This option can be changed + in: `config/nxp/app/bootloader.conf` + +- `CONFIG_BOOT_SIGNATURE_KEY_FILE`: This is used for the application to be + loaded by the bootloader. The path can be either absolute or relative. + Relative paths starts from the west workspace location. This option can be + changed in the application .conf files. + +Refer to those two files for more information: + +- [MCUBoot Config used for the MCUBoot Image](https://github.com/zephyrproject-rtos/mcuboot/blob/main/boot/zephyr/Kconfig) +- [MCUBoot Config used for the application](https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/Kconfig.mcuboot) + +JLink can be used to flash the mixed binary at the base address 0x8000000, using +the command : + +``` +J-Link > loadbin zephyr_full.bin 0x8000000 +``` + +The bootloader should then be able to jump directly to the start of the +application and run it. + +### Generating the OTA Update Image + +The same procedure can be followed from the +[Generating and flashing application image](#generating-and-flashing-application-image) +sub-section, replacing `CONFIG_CHIP_DEVICE_SOFTWARE_VERSION` with a number +greater than the initial one used on the active application (Candidate +application version number should be greater than the one used on the active +application). By default the value is set to 0, try resetting this option to 1 +to generate the OTA update Image. You can do this by adding +`-DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=1` to the west build command. + +The current implementation automates the following procedures: + +- Generation of the Image to be used for update (File generated: + `zephyr/zephyr.bin`)\* +- Signature of the Image (File generated: `zephyr/zephyr.signed.bin`)\* +- Conversion of the signed Image into the OTA format (.ota file) (File + generated: `zephyr/matter.ota`)\* + +> **Note**: \*All paths are relative to the output folder. + +The generated OTA file `matter.ota` can be used to perform the OTA Software +Update. The instructions below describes the procedure step-by-step. + +### Performing the OTA Software Update + +Setup example : + +- [Chip-tool](../../examples/chip-tool/README.md) application running on the + RPi. +- OTA Provider application built on the same RPi (as explained below). +- Board programmed with the example application (with the instructions above). + +Before starting the OTA process, the Linux OTA Provider application can be built +on the RPi (if not already present in the pre-installed apps) : + +``` +user@ubuntu:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false + +user@ubuntu:~/connectedhomeip$ : rm -rf /tmp/chip_* +user@ubuntu:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f matter.ota +``` + +The OTA Provider should first be provisioned with chip-tool by assigning it the +node id 1, and then granted the ACL entries : + +``` +user@ubuntu:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing onnetwork 1 20202021 +user@ubuntu:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 +``` + +The second step is to provision the device with the node id 2 using ble-wifi or +ble-thread commissioning. For example : + +``` +user@ubuntu:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing ble-wifi 2 WIFI_SSID WIFI_PASSWORD 20202021 3840 +``` + +Once commissioned, the OTA process can be initiated with the +"announce-ota-provider" command using chip-tool (the given numbers refer +respectively to [ProviderNodeId][vendorid] [AnnouncementReason][endpoint] +[node-id][endpoint-id]) : + +``` +user@ubuntu:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-otaprovider 1 0 0 0 2 0 +``` + +When the full update image is downloaded and stored, the bootloader will be +notified and the device will reboot with the update image. diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 5884f22d38fe4b..c81a268849fa1e 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -217,6 +217,12 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_DEVICE_LAYER_TARGET=${nxp_device_layer}", "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}", ] + } else if (chip_device_platform == "nxp_zephyr") { + device_layer_target_define = "NXP_ZEPHYR" + defines += [ + "CHIP_DEVICE_LAYER_TARGET_NXP_ZEPHYR=1", + "CHIP_DEVICE_LAYER_TARGET=nxp/zephyr", + ] } else if (chip_device_platform == "telink") { device_layer_target_define = "TELINK" defines += [ "CHIP_DEVICE_LAYER_TARGET=telink" ] @@ -320,6 +326,7 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "QPG", "K32W", "NXP", + "NXP_ZEPHYR", "TELINK", "MBED", "BL602", @@ -532,6 +539,8 @@ if (chip_device_platform != "none") { _platform_target = "qpg" } else if (chip_device_platform == "nxp") { _platform_target = "nxp" + } else if (chip_device_platform == "nxp_zephyr") { + _platform_target = "nxp/zephyr:nxp_zephyr" } else if (chip_device_platform == "telink") { _platform_target = "telink" } else if (chip_device_platform == "mbed") { diff --git a/src/platform/device.gni b/src/platform/device.gni index 7286805620e0c3..6a4c5a05535513 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -158,6 +158,8 @@ if (chip_device_platform == "cc13x2_26x2") { import("//build_overrides/nxp_sdk.gni") import("${nxp_sdk_build_root}/nxp_sdk.gni") _chip_device_layer = "nxp/${nxp_platform}" +} else if (chip_device_platform == "nxp_zephyr") { + _chip_device_layer = "nxp/zephyr" } else if (chip_device_platform == "telink") { _chip_device_layer = "telink" } else if (chip_device_platform == "mbed") { @@ -254,14 +256,15 @@ assert( chip_device_platform == "tizen" || chip_device_platform == "nrfconnect" || chip_device_platform == "nxp" || chip_device_platform == "k32w0" || chip_device_platform == "k32w1" || - chip_device_platform == "qpg" || chip_device_platform == "telink" || - chip_device_platform == "mbed" || chip_device_platform == "psoc6" || - chip_device_platform == "android" || chip_device_platform == "ameba" || - chip_device_platform == "cyw30739" || chip_device_platform == "webos" || - chip_device_platform == "mw320" || chip_device_platform == "zephyr" || - chip_device_platform == "beken" || chip_device_platform == "bl602" || - chip_device_platform == "bl702" || chip_device_platform == "bl702l" || - chip_device_platform == "mt793x" || chip_device_platform == "SiWx917" || + chip_device_platform == "nxp_zephyr" || chip_device_platform == "qpg" || + chip_device_platform == "telink" || chip_device_platform == "mbed" || + chip_device_platform == "psoc6" || chip_device_platform == "android" || + chip_device_platform == "ameba" || chip_device_platform == "cyw30739" || + chip_device_platform == "webos" || chip_device_platform == "mw320" || + chip_device_platform == "zephyr" || chip_device_platform == "beken" || + chip_device_platform == "bl602" || chip_device_platform == "bl702" || + chip_device_platform == "bl702l" || chip_device_platform == "mt793x" || + chip_device_platform == "SiWx917" || chip_device_platform == "openiotsdk" || chip_device_platform == "asr" || chip_device_platform == "stm32", "Please select a valid value for chip_device_platform") diff --git a/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp b/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp index 5991a81d703ac8..bdaaaae1d120b8 100644 --- a/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp +++ b/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp @@ -258,9 +258,9 @@ CHIP_ERROR FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & if (length == 10 && isdigit(date[0]) && isdigit(date[1]) && isdigit(date[2]) && isdigit(date[3]) && date[4] == '-' && isdigit(date[5]) && isdigit(date[6]) && date[7] == '-' && isdigit(date[8]) && isdigit(date[9])) { - year = 1000 * (date[0] - '0') + 100 * (date[1] - '0') + 10 * (date[2] - '0') + date[3] - '0'; - month = 10 * (date[5] - '0') + date[6] - '0'; - day = 10 * (date[8] - '0') + date[9] - '0'; + year = (uint16_t) (1000 * (date[0] - '0') + 100 * (date[1] - '0') + 10 * (date[2] - '0') + date[3] - '0'); + month = (uint8_t) (10 * (date[5] - '0') + date[6] - '0'); + day = (uint8_t) (10 * (date[8] - '0') + date[9] - '0'); } else { diff --git a/src/platform/nxp/zephyr/BLEManagerImpl.h b/src/platform/nxp/zephyr/BLEManagerImpl.h new file mode 100644 index 00000000000000..bb3e7405153b07 --- /dev/null +++ b/src/platform/nxp/zephyr/BLEManagerImpl.h @@ -0,0 +1,26 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the BLEManager singleton object + * for the Zephyr platforms. + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/BUILD.gn b/src/platform/nxp/zephyr/BUILD.gn new file mode 100644 index 00000000000000..1c370750d911a6 --- /dev/null +++ b/src/platform/nxp/zephyr/BUILD.gn @@ -0,0 +1,111 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/nxp/zephyr/args.gni") + +assert(chip_device_platform == "nxp_zephyr") + +static_library("nxp_zephyr") { + defines = [] + sources = [ + "../../SingletonConfigurationManager.cpp", + "../../Zephyr/BLEAdvertisingArbiter.cpp", + "../../Zephyr/BLEAdvertisingArbiter.h", + "../../Zephyr/BLEManagerImpl.cpp", + "../../Zephyr/ConfigurationManagerImpl.cpp", + "../../Zephyr/DiagnosticDataProviderImpl.cpp", + "../../Zephyr/DiagnosticDataProviderImpl.h", + "../../Zephyr/KeyValueStoreManagerImpl.cpp", + "../../Zephyr/Logging.cpp", + "../../Zephyr/PlatformManagerImpl.cpp", + "../../Zephyr/SysHeapMalloc.h", + "../../Zephyr/SystemTimeSupport.cpp", + "../../Zephyr/ZephyrConfig.cpp", + "../../Zephyr/ZephyrConfig.h", + "../common/CHIPDeviceNXPPlatformDefaultConfig.h", + "../common/CHIPNXPPlatformDefaultConfig.h", + "BLEManagerImpl.h", + "BlePlatformConfig.h", + "CHIPDevicePlatformConfig.h", + "CHIPDevicePlatformEvent.h", + "CHIPPlatformConfig.h", + "ConfigurationManagerImpl.h", + "ConnectivityManagerImpl.cpp", + "ConnectivityManagerImpl.h", + "DiagnosticDataProviderImplNxp.cpp", + "DiagnosticDataProviderImplNxp.h", + "InetPlatformConfig.h", + "KeyValueStoreManagerImpl.h", + "PlatformManagerImpl.h", + "SystemPlatformConfig.h", + ] + + public = [ + "${chip_root}/src/credentials/CHIPCert.h", + "${chip_root}/src/credentials/CertificationDeclaration.h", + "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", + "${chip_root}/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.h", + "${chip_root}/src/credentials/attestation_verifier/DeviceAttestationVerifier.h", + "${chip_root}/src/credentials/examples/DeviceAttestationCredsExample.h", + "${chip_root}/src/credentials/examples/ExampleDACs.h", + "${chip_root}/src/credentials/examples/ExamplePAI.h", + ] + + public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] + + if (chip_enable_factory_data) { + sources += [ + "../common/factory_data/FactoryDataProvider.cpp", + "../common/factory_data/FactoryDataProvider.h", + "FactoryDataProviderImpl.cpp", + "FactoryDataProviderImpl.h", + ] + defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/zephyr/FactoryDataProviderImpl.h\"" ] + } else { + sources += [ + "DeviceInstanceInfoProviderImpl.cpp", + "DeviceInstanceInfoProviderImpl.h", + ] + } + + if (chip_enable_wifi) { + sources += [ + "../../Zephyr/InetUtils.cpp", + "../../Zephyr/InetUtils.h", + "wifi/ConnectivityManagerImplWiFi.cpp", + "wifi/ConnectivityManagerImplWiFi.h", + "wifi/NxpWifiDriver.cpp", + "wifi/NxpWifiDriver.h", + "wifi/WiFiManager.cpp", + "wifi/WiFiManager.h", + ] + } + + if (chip_enable_ota_requestor) { + sources += [ + "ota/OTAImageProcessorImpl.cpp", + "ota/OTAImageProcessorImpl.h", + ] + } + + if (chip_malloc_sys_heap) { + sources += [ "../../Zephyr/SysHeapMalloc.cpp" ] + } + + cflags = [ "-Wconversion" ] +} diff --git a/src/platform/nxp/zephyr/BlePlatformConfig.h b/src/platform/nxp/zephyr/BlePlatformConfig.h new file mode 100644 index 00000000000000..35c31253622817 --- /dev/null +++ b/src/platform/nxp/zephyr/BlePlatformConfig.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP BLE + * Layer on Zephyr platform. + * + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/CHIPDevicePlatformConfig.h b/src/platform/nxp/zephyr/CHIPDevicePlatformConfig.h new file mode 100644 index 00000000000000..f8c72dd043902f --- /dev/null +++ b/src/platform/nxp/zephyr/CHIPDevicePlatformConfig.h @@ -0,0 +1,220 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the chip Device Layer + * on Zephyr platform. + */ + +#pragma once + +#include "autoconf.h" + +// ==================== Platform Adaptations ==================== + +#ifndef CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER CONFIG_CHIP_DEVICE_SERIAL_NUMBER +#endif + +#ifndef CHIP_DEVICE_CONFIG_TEST_MANUFACTURING_DATE +#define CHIP_DEVICE_CONFIG_TEST_MANUFACTURING_DATE CONFIG_CHIP_DEVICE_MANUFACTURING_DATE +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION CONFIG_CHIP_DEVICE_HARDWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR CONFIG_CHIP_DEVICE_DISCRIMINATOR +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT +#define CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT CONFIG_CHIP_DEVICE_SPAKE2_IT +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT +#define CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT CONFIG_CHIP_DEVICE_SPAKE2_SALT +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER +#define CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID CONFIG_CHIP_DEVICE_VENDOR_ID +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID CONFIG_CHIP_DEVICE_PRODUCT_ID +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME CONFIG_CHIP_DEVICE_VENDOR_NAME +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME CONFIG_CHIP_DEVICE_PRODUCT_NAME +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION CONFIG_CHIP_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifdef CONFIG_NET_L2_OPENTHREAD +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD CONFIG_NET_L2_OPENTHREAD +#else +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 +#endif + +#ifdef CONFIG_WIFI_NXP +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI CONFIG_WIFI_NXP +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 +#else +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI 0 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 +#endif + +#ifdef CONFIG_BT +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_BT +#else +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0 +#endif + +// ========== Platform-specific Configuration ========= + +// These are configuration options that are unique to Zephyr platforms. +// These can be overridden by the application as needed. + +#ifndef CHIP_DEVICE_CONFIG_SETTINGS_KEY +/// Key for all Matter persistent data stored using the Zephyr Settings API +#define CHIP_DEVICE_CONFIG_SETTINGS_KEY "mt" +#endif // CHIP_DEVICE_CONFIG_SETTINGS_KEY + +#ifndef CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS +/// Delay between completing a firmware update download and reboot to apply the update +#define CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS 1000 +#endif // CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS + +#ifndef CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS +/// Time to sleep after running server shutdown actions to let lower layers complete the actions. +/// This may include transmitting packets created by the actions. +#define CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS 500 +#endif // CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS + +#ifndef CHIP_DEVICE_CONFIG_HEAP_STATISTICS_MALLINFO +#if !defined(CONFIG_CHIP_MALLOC_SYS_HEAP) && defined(CONFIG_NEWLIB_LIBC) +/// Use mallinfo() to obtain the heap usage statistics exposed by SoftwareDiagnostics cluster attributes. +#define CHIP_DEVICE_CONFIG_HEAP_STATISTICS_MALLINFO 1 +#else +#define CHIP_DEVICE_CONFIG_HEAP_STATISTICS_MALLINFO 0 +#endif // !defined(CONFIG_CHIP_MALLOC_SYS_HEAP) && defined(CONFIG_NEWLIB_LIBC) +#endif // CHIP_DEVICE_CONFIG_HEAP_STATISTICS_MALLINFO + +#ifndef CHIP_DEVICE_BLE_ADVERTISING_PRIORITY +/// Priority of the Matter BLE advertising when there are multiple application +/// components that compete for the BLE advertising. +#define CHIP_DEVICE_BLE_ADVERTISING_PRIORITY 0 +#endif // CHIP_DEVICE_BLE_ADVERTISING_PRIORITY + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY +#define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY (K_PRIO_PREEMPT(1)) +#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY + +#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 8192 +#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0 + +#define CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART 0 + +#ifndef CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART +#define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 0 +#else +#define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART +#endif // CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART + +#ifdef CONFIG_CHIP_ENABLE_DNSSD_SRP +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 +#ifdef CONFIG_CHIP_ENABLE_DNS_CLIENT +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 +#endif // CONFIG_CHIP_ENABLE_DNS_CLIENT +#endif // CONFIG_CHIP_ENABLE_DNSSD_SRP + +#if defined(CONFIG_CHIP_ENABLE_ICD_SUPPORT) && defined(CONFIG_CHIP_THREAD_SSED) +#define CHIP_DEVICE_CONFIG_THREAD_SSED CONFIG_CHIP_THREAD_SSED +#else +#define CHIP_DEVICE_CONFIG_THREAD_SSED 0 +#endif // defined(CONFIG_CHIP_ENABLE_ICD_SUPPORT) && defined(CONFIG_CHIP_THREAD_SSED) + +#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL +#ifdef CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL) +#endif // CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL +#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL + +#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL +#ifdef CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL) +#endif // CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL +#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL + +#ifdef CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 +#endif // CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE + +#ifdef CONFIG_CHIP_DEVICE_TYPE +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE CONFIG_CHIP_DEVICE_TYPE +#endif // CONFIG_CHIP_DEVICE_TYPE + +#ifdef CONFIG_CHIP_EXTENDED_DISCOVERY +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 +#endif // CONFIG_CHIP_EXTENDED_DISCOVERY + +#ifndef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH +#ifdef CONFIG_CHIP_FACTORY_DATA +// UID will be copied from the externally programmed factory data, so we don't know the actual length and we need to assume some max +// boundary. +#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN +#else +// UID will be copied from hex encoded Kconfig option, so we may calculate its length in bytes by subtracting null terminator and +// dividing size by 2. +#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH ((sizeof(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) - 1) / 2) +#endif // CONFIG_CHIP_FACTORY_DATA +#endif // CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH + +#include diff --git a/src/platform/nxp/zephyr/CHIPDevicePlatformEvent.h b/src/platform/nxp/zephyr/CHIPDevicePlatformEvent.h new file mode 100644 index 00000000000000..3b38a1d75ccf58 --- /dev/null +++ b/src/platform/nxp/zephyr/CHIPDevicePlatformEvent.h @@ -0,0 +1,26 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Defines platform-specific event types and data for the chip + * Device Layer on Zephyr platforms. + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/CHIPPlatformConfig.h b/src/platform/nxp/zephyr/CHIPPlatformConfig.h new file mode 100644 index 00000000000000..cd9873051e5fed --- /dev/null +++ b/src/platform/nxp/zephyr/CHIPPlatformConfig.h @@ -0,0 +1,141 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for CHIP on + * Zephyr platform. + */ + +#pragma once + +#ifdef CONFIG_CHIP_CRYPTO_PSA +#include +#endif + +// ==================== General Platform Adaptations ==================== + +#define CHIP_CONFIG_ABORT() abort() + +#define CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE const char * +#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 + +#define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY "rc" + +// ==================== Security Adaptations ==================== + +#ifdef CONFIG_CHIP_CRYPTO_PSA +#define CHIP_CONFIG_SHA256_CONTEXT_SIZE sizeof(psa_hash_operation_t) +#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN psa_hash_operation_t +#elif defined(CONFIG_CC3XX_BACKEND) +// Size of the statically allocated context for SHA256 operations in CryptoPAL +// determined empirically. +#define CHIP_CONFIG_SHA256_CONTEXT_SIZE 244 +#else +#define CHIP_CONFIG_SHA256_CONTEXT_SIZE 208 +#endif + +// ==================== General Configuration Overrides ==================== + +#ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS +#define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 +#endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS + +#ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 +#endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS + +#ifndef CHIP_LOG_FILTERING +#define CHIP_LOG_FILTERING 0 +#endif // CHIP_LOG_FILTERING + +#ifndef CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS +#define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1 +#endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS + +#ifndef CHIP_CONFIG_MAX_FABRICS +#define CHIP_CONFIG_MAX_FABRICS 5 +#endif + +#ifdef CONFIG_CHIP_LOG_SIZE_OPTIMIZATION +// Disable some of the too detailed log modules to save flash +#define CHIP_CONFIG_LOG_MODULE_ExchangeManager_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Crypto_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Crypto_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_BDX_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_BDX_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_EventLogging_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_EventLogging_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_SetupPayload_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_SetupPayload_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_CASESessionManager_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_CASESessionManager_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_DataManagement_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_FabricProvisioning_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_chipSystemLayer_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_chipSystemLayer_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_Zcl_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_SecureChannel_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Ble_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_AppServer_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Support_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Support_PROGRESS 0 +#endif + +// Set MRP retry intervals for Thread and Wi-Fi to test-proven values. +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#if CHIP_ENABLE_OPENTHREAD +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (800_ms32) +#else +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif // CHIP_ENABLE_OPENTHREAD +#endif // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + +#ifndef CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL +#if CHIP_ENABLE_OPENTHREAD +#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL (800_ms32) +#else +#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL (2000_ms32) +#endif // CHIP_ENABLE_OPENTHREAD +#endif // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL + +#ifndef CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC +#ifdef CONFIG_CHIP_ICD_IDLE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC CONFIG_CHIP_ICD_IDLE_MODE_INTERVAL +#endif // CONFIG_CHIP_ICD_IDLE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS +#ifdef CONFIG_CHIP_ICD_ACTIVE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS CONFIG_CHIP_ICD_ACTIVE_MODE_INTERVAL +#endif // CONFIG_CHIP_ICD_ACTIVE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS +#ifdef CONFIG_CHIP_ICD_ACTIVE_MODE_THRESHOLD +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS CONFIG_CHIP_ICD_ACTIVE_MODE_THRESHOLD +#endif // CONFIG_CHIP_ICD_ACTIVE_MODE_THRESHOLD +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS + +#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#ifdef CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC +#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC +#endif // CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC +#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#include +#include diff --git a/src/platform/nxp/zephyr/ConfigurationManagerImpl.h b/src/platform/nxp/zephyr/ConfigurationManagerImpl.h new file mode 100644 index 00000000000000..846671b64b1683 --- /dev/null +++ b/src/platform/nxp/zephyr/ConfigurationManagerImpl.h @@ -0,0 +1,26 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the ConfigurationManager object + * for Zephyr platforms. + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp new file mode 100644 index 00000000000000..888e5748ad6b10 --- /dev/null +++ b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +#include +#include + +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +using namespace ::chip; +using namespace ::chip::TLV; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { + +ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; + +CHIP_ERROR ConnectivityManagerImpl::_Init() +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_Init(); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + ReturnErrorOnFailure(InitWiFi()); +#endif + return CHIP_NO_ERROR; +} + +void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + // Forward the event to the generic base classes as needed. +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_OnPlatformEvent(event); +#endif +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/ConnectivityManagerImpl.h b/src/platform/nxp/zephyr/ConnectivityManagerImpl.h new file mode 100644 index 00000000000000..6d7a717886a7eb --- /dev/null +++ b/src/platform/nxp/zephyr/ConnectivityManagerImpl.h @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#else +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#else +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include "wifi/ConnectivityManagerImplWiFi.h" +#else +#include +#endif + +#include + +namespace chip { +namespace Inet { +class IPAddress; +} // namespace Inet +} // namespace chip + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the ConnectivityManager singleton object for Zephyr platforms. + */ +class ConnectivityManagerImpl final : public ConnectivityManager, + public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + public Internal::GenericConnectivityManagerImpl_BLE, +#else + public Internal::GenericConnectivityManagerImpl_NoBLE, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + public Internal::GenericConnectivityManagerImpl_Thread, +#else + public Internal::GenericConnectivityManagerImpl_NoThread, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + public ConnectivityManagerImplWiFi +#else + public Internal::GenericConnectivityManagerImpl_NoWiFi +#endif +{ + // Allow the ConnectivityManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class ConnectivityManager; + +private: + // ===== Members that implement the ConnectivityManager abstract interface. + + CHIP_ERROR _Init(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + + // ===== Members for internal use by the following friends. + + friend ConnectivityManager & ConnectivityMgr(void); + friend ConnectivityManagerImpl & ConnectivityMgrImpl(void); + + static ConnectivityManagerImpl sInstance; +}; + +/** + * Returns the public interface of the ConnectivityManager singleton object. + * + * chip applications should use this to access features of the ConnectivityManager object + * that are common to all platforms. + */ +inline ConnectivityManager & ConnectivityMgr(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the ConnectivityManager singleton object. + * + * chip applications can use this to gain access to features of the ConnectivityManager + * that are specific to the NXP platform. + */ +inline ConnectivityManagerImpl & ConnectivityMgrImpl(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp new file mode 100644 index 00000000000000..92029ebd617386 --- /dev/null +++ b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp @@ -0,0 +1,47 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "DeviceInstanceInfoProviderImpl.h" +#include + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR DeviceInstanceInfoProviderImpl::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) +{ +#if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) + static_assert(ConfigurationManager::kRotatingDeviceIDUniqueIDLength >= ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength, + "Length of unique ID for rotating device ID is smaller than minimum."); + + ReturnErrorCodeIf(ConfigurationManager::kRotatingDeviceIDUniqueIDLength > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + + size_t bytesLen = chip::Encoding::HexToBytes(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID, + ConfigurationManager::kRotatingDeviceIDUniqueIDLength * 2, uniqueIdSpan.data(), + uniqueIdSpan.size()); + + ReturnErrorCodeIf(bytesLen != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); + uniqueIdSpan.reduce_size(bytesLen); + + return CHIP_NO_ERROR; +#endif // CHIP_ENABLE_ROTATING_DEVICE_ID + + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.h b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.h new file mode 100644 index 00000000000000..31cc98bfaa2a84 --- /dev/null +++ b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { + +class DeviceInstanceInfoProviderImpl : public Internal::GenericDeviceInstanceInfoProvider +{ +public: + CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; + + DeviceInstanceInfoProviderImpl(ConfigurationManagerImpl & configManager) : + Internal::GenericDeviceInstanceInfoProvider(configManager) + {} +}; + +inline DeviceInstanceInfoProviderImpl & DeviceInstanceInfoProviderMgrImpl() +{ + static DeviceInstanceInfoProviderImpl sInstance(ConfigurationManagerImpl::GetDefaultInstance()); + return sInstance; +} +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp new file mode 100644 index 00000000000000..b7f0e2523610a5 --- /dev/null +++ b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object + * for NXP Zephyr platform. + */ + +#include "DiagnosticDataProviderImplNxp.h" + +#ifdef CONFIG_WIFI_NXP +#include +#endif + +namespace chip { +namespace DeviceLayer { + +DiagnosticDataProvider & GetDiagnosticDataProviderImpl() +{ + return DiagnosticDataProviderImplNxp::GetDefaultInstance(); +} + +DiagnosticDataProviderImplNxp & DiagnosticDataProviderImplNxp::GetDefaultInstance() +{ + static DiagnosticDataProviderImplNxp sInstance; + return sInstance; +} + +#ifdef CONFIG_WIFI_NXP +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiBssId(MutableByteSpan & value) +{ + WiFiManager::WiFiInfo info; + ReturnErrorOnFailure(WiFiManager::Instance().GetWiFiInfo(info)); + ReturnErrorCodeIf(sizeof(info.mBssId) >= value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + + memcpy(value.data(), info.mBssId, sizeof(info.mBssId)); + value.reduce_size(sizeof(info.mBssId)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DiagnosticDataProviderImplNxp::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) +{ + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + + WiFiManager::WiFiInfo info; + CHIP_ERROR err = WiFiManager::Instance().GetWiFiInfo(info); + securityType = info.mSecurityType; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wiFiVersion) +{ + WiFiManager::WiFiInfo info; + CHIP_ERROR err = WiFiManager::Instance().GetWiFiInfo(info); + wiFiVersion = info.mWiFiVersion; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiChannelNumber(uint16_t & channelNumber) +{ + WiFiManager::WiFiInfo info; + CHIP_ERROR err = WiFiManager::Instance().GetWiFiInfo(info); + channelNumber = info.mChannel; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiRssi(int8_t & rssi) +{ + WiFiManager::WiFiInfo info; + CHIP_ERROR err = WiFiManager::Instance().GetWiFiInfo(info); + rssi = info.mRssi; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + beaconLostCount = stats.mBeaconsLostCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + beaconRxCount = stats.mBeaconsSuccessCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + packetMulticastRxCount = stats.mPacketMulticastRxCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + packetMulticastTxCount = stats.mPacketMulticastTxCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + packetUnicastRxCount = stats.mPacketUnicastRxCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) +{ + WiFiManager::NetworkStatistics stats; + CHIP_ERROR err = WiFiManager::Instance().GetNetworkStatistics(stats); + packetUnicastTxCount = stats.mPacketUnicastTxCount; + return err; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiOverrunCount(uint64_t & overrunCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImplNxp::ResetWiFiNetworkDiagnosticsCounts() +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} +#endif + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.h b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.h new file mode 100644 index 00000000000000..cac2fa240ffa18 --- /dev/null +++ b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.h @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object + * for NXP Zephyr platform. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { + +class DiagnosticDataProviderImplNxp : public DiagnosticDataProviderImpl +{ +public: +#ifdef CONFIG_WIFI_NXP + CHIP_ERROR GetWiFiBssId(MutableByteSpan & value) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; + CHIP_ERROR GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wiFiVersion) override; + CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; + CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; + CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override; + CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override; + CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override; + CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override; + CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) override; + CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override; + CHIP_ERROR GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) override; + CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override; + CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; +#endif + + static DiagnosticDataProviderImplNxp & GetDefaultInstance(); + +private: + DiagnosticDataProviderImplNxp() = default; +}; + +DiagnosticDataProvider & GetDiagnosticDataProviderImpl(); + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/FactoryDataProviderImpl.cpp b/src/platform/nxp/zephyr/FactoryDataProviderImpl.cpp new file mode 100644 index 00000000000000..85c6f9d047bd1c --- /dev/null +++ b/src/platform/nxp/zephyr/FactoryDataProviderImpl.cpp @@ -0,0 +1,246 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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. + */ + +/* -------------------------------------------------------------------------- */ +/* Includes */ +/* -------------------------------------------------------------------------- */ + +#include "FactoryDataProviderImpl.h" + +/* mbedtls */ +#include "mbedtls/aes.h" +#include "mbedtls/sha256.h" + +/* -------------------------------------------------------------------------- */ +/* Private macros */ +/* -------------------------------------------------------------------------- */ + +#define HASH_ID 0xCE47BA5E + +/* -------------------------------------------------------------------------- */ +/* Class implementation */ +/* -------------------------------------------------------------------------- */ + +namespace chip { +namespace DeviceLayer { + +FactoryDataProviderImpl FactoryDataProviderImpl::sInstance; + +CHIP_ERROR FactoryDataProviderImpl::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr) +{ + CHIP_ERROR err = CHIP_ERROR_NOT_FOUND; + uint8_t type = 0; + uint32_t index = 0; + uint8_t * factoryDataAddress = &mFactoryData.factoryDataBuffer[0]; + uint32_t factoryDataSize = sizeof(mFactoryData.factoryDataBuffer); + uint16_t currentLen = 0; + + while (index < factoryDataSize) + { + /* Read the type */ + memcpy((uint8_t *) &type, factoryDataAddress + index, sizeof(type)); + index += sizeof(type); + + /* Read the len */ + memcpy((uint8_t *) ¤tLen, factoryDataAddress + index, sizeof(currentLen)); + index += sizeof(currentLen); + + /* Check if the type gotten is the expected one */ + if (searchedType == type) + { + /* If pBuf is null it means that we only want to know if the Type has been found */ + if (pBuf != NULL) + { + /* If the buffer given is too small, fill only the available space */ + if (bufLength < currentLen) + { + currentLen = (uint16_t) bufLength; + } + memcpy((uint8_t *) pBuf, factoryDataAddress + index, currentLen); + } + length = (uint16_t) currentLen; + if (contentAddr != NULL) + { + *contentAddr = (uint32_t) factoryDataAddress + index; + } + err = CHIP_NO_ERROR; + break; + } + else if (type == 0) + { + /* No more type available , break the loop */ + break; + } + else + { + /* Jump to next data */ + index += currentLen; + } + } + + return err; +} + +CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer) +{ + Crypto::P256ECDSASignature signature; + Crypto::P256Keypair keypair; + + VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsSpanUsable(digestToSign), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); + + // In a non-exemplary implementation, the public key is not needed here. It is used here merely because + // Crypto::P256Keypair is only (currently) constructable from raw keys if both private/public keys are present. + Crypto::P256PublicKey dacPublicKey; + uint16_t certificateSize = 0; + uint32_t certificateAddr; + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, certificateSize, &certificateAddr)); + MutableByteSpan dacCertSpan((uint8_t *) certificateAddr, certificateSize); + + /* Extract Public Key of DAC certificate from itself */ + ReturnErrorOnFailure(Crypto::ExtractPubkeyFromX509Cert(dacCertSpan, dacPublicKey)); + + /* Get private key of DAC certificate from reserved section */ + uint16_t keySize = 0; + uint32_t keyAddr; + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, keySize, &keyAddr)); + MutableByteSpan dacPrivateKeySpan((uint8_t *) keyAddr, keySize); + + ReturnErrorOnFailure(LoadKeypairFromRaw(ByteSpan(dacPrivateKeySpan.data(), dacPrivateKeySpan.size()), + ByteSpan(dacPublicKey.Bytes(), dacPublicKey.Length()), keypair)); + + ReturnErrorOnFailure(keypair.ECDSA_sign_msg(digestToSign.data(), digestToSign.size(), signature)); + + return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); +} + +CHIP_ERROR FactoryDataProviderImpl::LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair) +{ + Crypto::P256SerializedKeypair serialized_keypair; + ReturnErrorOnFailure(serialized_keypair.SetLength(privateKey.size() + publicKey.size())); + memcpy(serialized_keypair.Bytes(), publicKey.data(), publicKey.size()); + memcpy(serialized_keypair.Bytes() + publicKey.size(), privateKey.data(), privateKey.size()); + return keypair.Deserialize(serialized_keypair); +} + +CHIP_ERROR FactoryDataProviderImpl::Init(void) +{ + int ret; + CHIP_ERROR res; + const struct device * flashDevice; + uint8_t currentBlock[16]; + off_t factoryDataOffset = FIXED_PARTITION_OFFSET(factory_partition); + + flashDevice = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)); + + /* Read the factory data header from flash */ + ret = flash_read(flashDevice, factoryDataOffset, (void *) &mFactoryData, sizeof(FactoryDataProviderImpl::Header)); + if (ret != 0) + { + return CHIP_ERROR_READ_FAILED; + } + + /* Check ID is valid */ + if (mFactoryData.header.hashId != HASH_ID) + { + return CHIP_ERROR_NOT_FOUND; + } + + // TODO: add HASH compute + check + + factoryDataOffset += sizeof(FactoryDataProviderImpl::Header); + + /* Load the buffer into RAM by reading each 16 bytes blocks */ + for (int i = 0; (uint32_t) i < (mFactoryData.header.size / 16U); i++) + { + ret = flash_read(flashDevice, factoryDataOffset + i * 16, (void *) ¤tBlock[0], sizeof(currentBlock)); + if (ret != 0) + { + return CHIP_ERROR_READ_FAILED; + } + + if (pAes128Key != NULL) + { + /* Decrypt data if a key has been set */ + res = ReadEncryptedData(&mFactoryData.factoryDataBuffer[i * 16], ¤tBlock[0]); + if (res != CHIP_NO_ERROR) + { + return res; + } + } + else + { + /* No key was set, copy the data as is */ + memcpy(&mFactoryData.factoryDataBuffer[i * 16], ¤tBlock[0], sizeof(currentBlock)); + } + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::SetAes128Key(const uint8_t * keyAes128) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (keyAes128 != nullptr) + { + pAes128Key = keyAes128; + error = CHIP_NO_ERROR; + } + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::SetEncryptionMode(EncryptionMode mode) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + + /* + * Currently the fwk_factory_data_provider module supports only ecb mode. + * Therefore return an error if encrypt mode is not ecb + */ + if (mode == encrypt_ecb) + { + encryptMode = mode; + error = CHIP_NO_ERROR; + } + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::ReadEncryptedData(uint8_t * dest, uint8_t * source) +{ + mbedtls_aes_context aesCtx; + + mbedtls_aes_init(&aesCtx); + + if (mbedtls_aes_setkey_dec(&aesCtx, pAes128Key, 128U) != 0) + { + return CHIP_ERROR_INTERNAL; + } + + if (mbedtls_aes_crypt_ecb(&aesCtx, MBEDTLS_AES_DECRYPT, source, dest) != 0) + { + return CHIP_ERROR_INTERNAL; + } + + mbedtls_aes_free(&aesCtx); + + return CHIP_NO_ERROR; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/FactoryDataProviderImpl.h b/src/platform/nxp/zephyr/FactoryDataProviderImpl.h new file mode 100644 index 00000000000000..a0424a7e3f4412 --- /dev/null +++ b/src/platform/nxp/zephyr/FactoryDataProviderImpl.h @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include + +#include +#include + +namespace chip { +namespace DeviceLayer { + +/** + * @brief This class provides Commissionable data and Device Attestation Credentials. + * + * This implementation is using the SDK fwk_factory_data_provider module. + * + * For more information on this module, the interface description available in + * FactoryDataProvider/fwk_factory_data_provider.h inside the SDK can be checked. + */ + +class FactoryDataProviderImpl : public FactoryDataProvider +{ +public: + static FactoryDataProviderImpl sInstance; + + CHIP_ERROR Init(void); + CHIP_ERROR SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr = NULL); + CHIP_ERROR SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer); + + CHIP_ERROR SetAes128Key(const uint8_t * keyAes128); + CHIP_ERROR SetEncryptionMode(EncryptionMode mode); + +private: + struct Header + { + uint32_t hashId; + uint32_t size; + uint8_t hash[4]; + }; + + struct FactoryData + { + struct Header header; + uint8_t factoryDataBuffer[FIXED_PARTITION_SIZE(factory_partition) - sizeof(struct Header)]; + }; + + FactoryData mFactoryData; + const uint8_t * pAes128Key = nullptr; + EncryptionMode encryptMode = encrypt_ecb; + + CHIP_ERROR ReadEncryptedData(uint8_t * dest, uint8_t * source); + CHIP_ERROR LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair); +}; + +inline FactoryDataProvider & FactoryDataPrvd() +{ + return FactoryDataProviderImpl::sInstance; +} + +inline FactoryDataProviderImpl & FactoryDataPrvdImpl() +{ + return FactoryDataProviderImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/InetPlatformConfig.h b/src/platform/nxp/zephyr/InetPlatformConfig.h new file mode 100644 index 00000000000000..644cdea6b20423 --- /dev/null +++ b/src/platform/nxp/zephyr/InetPlatformConfig.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP Inet + * Layer on Zephyr platform. + * + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/KeyValueStoreManagerImpl.h b/src/platform/nxp/zephyr/KeyValueStoreManagerImpl.h new file mode 100644 index 00000000000000..c497842975c401 --- /dev/null +++ b/src/platform/nxp/zephyr/KeyValueStoreManagerImpl.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific key value storage implementation for Zephyr. + * + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/PlatformManagerImpl.h b/src/platform/nxp/zephyr/PlatformManagerImpl.h new file mode 100644 index 00000000000000..75dcb0e7d7481c --- /dev/null +++ b/src/platform/nxp/zephyr/PlatformManagerImpl.h @@ -0,0 +1,25 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the PlatformManager object. + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/SystemPlatformConfig.h b/src/platform/nxp/zephyr/SystemPlatformConfig.h new file mode 100644 index 00000000000000..24f8c4d229e235 --- /dev/null +++ b/src/platform/nxp/zephyr/SystemPlatformConfig.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP System + * Layer on Zephyr platform. + * + */ + +#pragma once + +#include diff --git a/src/platform/nxp/zephyr/args.gni b/src/platform/nxp/zephyr/args.gni new file mode 100644 index 00000000000000..e24f997ccdf64b --- /dev/null +++ b/src/platform/nxp/zephyr/args.gni @@ -0,0 +1,20 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare_args() { + chip_malloc_sys_heap = false + + # Enable factory data support + chip_enable_factory_data = false +} diff --git a/src/platform/nxp/zephyr/nxp-zephyr-mbedtls-config.h b/src/platform/nxp/zephyr/nxp-zephyr-mbedtls-config.h new file mode 100644 index 00000000000000..4b9b0e857113d7 --- /dev/null +++ b/src/platform/nxp/zephyr/nxp-zephyr-mbedtls-config.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2024 NXP + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if CONFIG_CHIP_CRYPTO_PSA +#define MBEDTLS_PSA_CRYPTO_DRIVERS +#endif /* CONFIG_CHIP_CRYPTO_PSA */ + +#if CONFIG_MCUX_ELS_PKC + +#define MBEDTLS_CIPHER_PADDING_PKCS7 + +#if CONFIG_WIFI_NXP && CONFIG_WPA_SUPP +#include "wpa_supp_els_pkc_mbedtls_config.h" +#endif /* CONFIG_WIFI_NXP && CONFIG_WPA_SUPP */ + +#if CONFIG_MCUX_PSA_CRYPTO_DRIVER_ELS_PKC +#define PSA_CRYPTO_DRIVER_ELS_PKC +#endif /* CONFIG_MCUX_PSA_CRYPTO_DRIVER_ELS_PKC */ + +#endif /* CONFIG_MCUX_ELS_PKC */ + +#undef MBEDTLS_MD4_C +#undef MBEDTLS_ARC4_C diff --git a/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp new file mode 100644 index 00000000000000..0d027b0407a5b8 --- /dev/null +++ b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp @@ -0,0 +1,174 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "OTAImageProcessorImpl.h" + +#include +#include +#include + +#include +#include +#include +#include + +static struct stream_flash_ctx stream; + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() +{ + VerifyOrReturnError(mDownloader != nullptr, CHIP_ERROR_INCORRECT_STATE); + + return DeviceLayer::SystemLayer().ScheduleLambda([this] { mDownloader->OnPreparedForDownload(PrepareDownloadImpl()); }); +} + +CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl() +{ + mHeaderParser.Init(); + mParams = {}; + + const struct device * flash_dev; + + flash_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)); + if (flash_dev == NULL) + { + ChipLogError(SoftwareUpdate, "Failed to get flash device"); + return System::MapErrorZephyr(-EFAULT); + } + + int err = stream_flash_init(&stream, flash_dev, mBuffer, sizeof(mBuffer), FIXED_PARTITION_OFFSET(slot1_partition), + FIXED_PARTITION_SIZE(slot1_partition), NULL); + + if (err) + { + ChipLogError(SoftwareUpdate, "stream_flash_init failed (err %d)", err); + } + + return System::MapErrorZephyr(err); +} + +CHIP_ERROR OTAImageProcessorImpl::Finalize() +{ + int err = stream_flash_buffered_write(&stream, NULL, 0, true); + + if (err) + { + ChipLogError(SoftwareUpdate, "stream_flash_buffered_write failed (err %d)", err); + } + + return System::MapErrorZephyr(err); +} + +CHIP_ERROR OTAImageProcessorImpl::Abort() +{ + ChipLogError(SoftwareUpdate, "Image upgrade aborted"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Apply() +{ + // Schedule update of image + int err = boot_request_upgrade(BOOT_UPGRADE_PERMANENT); + +#ifdef CONFIG_CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY + if (!err) + { + return SystemLayer().StartTimer( + System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS), + [](System::Layer *, void * /* context */) { + PlatformMgr().HandleServerShuttingDown(); + k_msleep(CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS); + sys_reboot(SYS_REBOOT_WARM); + }, + nullptr /* context */); + } + else + { + return System::MapErrorZephyr(err); + } +#else + return System::MapErrorZephyr(err); +#endif +} + +CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & aBlock) +{ + VerifyOrReturnError(mDownloader != nullptr, CHIP_ERROR_INCORRECT_STATE); + + CHIP_ERROR error = ProcessHeader(aBlock); + + if (error == CHIP_NO_ERROR) + { + error = System::MapErrorZephyr(stream_flash_buffered_write(&stream, aBlock.data(), aBlock.size(), false)); + mParams.downloadedBytes += aBlock.size(); + } + + // Report the result back to the downloader asynchronously. + return DeviceLayer::SystemLayer().ScheduleLambda([this, error, aBlock] { + if (error == CHIP_NO_ERROR) + { + ChipLogDetail(SoftwareUpdate, "Downloaded %u/%u bytes", static_cast(mParams.downloadedBytes), + static_cast(mParams.totalFileBytes)); + mDownloader->FetchNextData(); + } + else + { + mDownloader->EndDownload(error); + } + }); +} + +bool OTAImageProcessorImpl::IsFirstImageRun() +{ + OTARequestorInterface * requestor = GetRequestorInstance(); + ReturnErrorCodeIf(requestor == nullptr, false); + + uint32_t currentVersion; + ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + + return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying && + requestor->GetTargetVersion() == currentVersion; +} + +CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() +{ + return System::MapErrorZephyr(boot_write_img_confirmed()); +} + +CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & aBlock) +{ + if (mHeaderParser.IsInitialized()) + { + OTAImageHeader header; + CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(aBlock, header); + + // Needs more data to decode the header + ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + ReturnErrorOnFailure(error); + + mParams.totalFileBytes = header.mPayloadSize; + mHeaderParser.Clear(); + } + + return CHIP_NO_ERROR; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.h b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.h new file mode 100755 index 00000000000000..e4a8a95ba721ae --- /dev/null +++ b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { + +class OTADownloader; + +namespace DeviceLayer { + +class OTAImageProcessorImpl : public OTAImageProcessorInterface +{ +public: + static constexpr size_t kBufferSize = CONFIG_CHIP_OTA_REQUESTOR_BUFFER_SIZE; + + void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; }; + + CHIP_ERROR PrepareDownload() override; + CHIP_ERROR Finalize() override; + CHIP_ERROR Abort() override; + CHIP_ERROR Apply() override; + CHIP_ERROR ProcessBlock(ByteSpan & aBlock) override; + bool IsFirstImageRun() override; + CHIP_ERROR ConfirmCurrentImage() override; + +private: + CHIP_ERROR PrepareDownloadImpl(); + CHIP_ERROR ProcessHeader(ByteSpan & aBlock); + + OTADownloader * mDownloader = nullptr; + OTAImageHeaderParser mHeaderParser; + uint8_t mBuffer[kBufferSize]; +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.cpp new file mode 100644 index 00000000000000..3fefcf709e1b9b --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.cpp @@ -0,0 +1,178 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include + +#include "ConnectivityManagerImplWiFi.h" +#include "WiFiManager.h" + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::TLV; + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR ConnectivityManagerImplWiFi::InitWiFi() +{ + return WiFiManager::Instance().Init(); +} + +ConnectivityManager::WiFiStationMode ConnectivityManagerImplWiFi::_GetWiFiStationMode(void) +{ + if (mStationMode != ConnectivityManager::WiFiStationMode::kWiFiStationMode_ApplicationControlled) + { + mStationMode = (WiFiManager::StationStatus::DISABLED == WiFiManager().Instance().GetStationStatus()) + ? ConnectivityManager::WiFiStationMode::kWiFiStationMode_Disabled + : ConnectivityManager::WiFiStationMode::kWiFiStationMode_Enabled; + } + return mStationMode; +} + +CHIP_ERROR ConnectivityManagerImplWiFi::_SetWiFiStationMode(ConnectivityManager::WiFiStationMode aMode) +{ + VerifyOrReturnError(ConnectivityManager::WiFiStationMode::kWiFiStationMode_NotSupported != aMode, CHIP_ERROR_INVALID_ARGUMENT); + + mStationMode = aMode; + + return CHIP_NO_ERROR; +} + +bool ConnectivityManagerImplWiFi::_IsWiFiStationEnabled(void) +{ + return (WiFiManager::StationStatus::DISABLED <= WiFiManager().Instance().GetStationStatus()); +} + +bool ConnectivityManagerImplWiFi::_IsWiFiStationApplicationControlled(void) +{ + return (ConnectivityManager::WiFiStationMode::kWiFiStationMode_ApplicationControlled == mStationMode); +} + +bool ConnectivityManagerImplWiFi::_IsWiFiStationConnected(void) +{ + return (WiFiManager::StationStatus::CONNECTED == WiFiManager().Instance().GetStationStatus()); +} + +System::Clock::Timeout ConnectivityManagerImplWiFi::_GetWiFiStationReconnectInterval(void) +{ + return mWiFiStationReconnectInterval; +} + +CHIP_ERROR ConnectivityManagerImplWiFi::_SetWiFiStationReconnectInterval(System::Clock::Timeout val) +{ + mWiFiStationReconnectInterval = val; + return CHIP_NO_ERROR; +} + +bool ConnectivityManagerImplWiFi::_IsWiFiStationProvisioned(void) +{ + // from Matter perspective `provisioned` means that the supplicant has been provided + // with SSID and password (doesn't matter if valid or not) + return (WiFiManager::StationStatus::CONNECTING <= WiFiManager().Instance().GetStationStatus()); +} + +void ConnectivityManagerImplWiFi::_ClearWiFiStationProvision(void) +{ + if (_IsWiFiStationProvisioned()) + { + if (CHIP_NO_ERROR != WiFiManager().Instance().ClearStationProvisioningData()) + { + ChipLogError(DeviceLayer, "Cannot clear WiFi station provisioning data"); + } + } +} + +bool ConnectivityManagerImplWiFi::_CanStartWiFiScan() +{ + return (WiFiManager::StationStatus::DISABLED != WiFiManager().Instance().GetStationStatus() && + WiFiManager::StationStatus::SCANNING != WiFiManager().Instance().GetStationStatus() && + WiFiManager::StationStatus::CONNECTING != WiFiManager().Instance().GetStationStatus()); +} + +void ConnectivityManagerImplWiFi::_OnWiFiStationProvisionChange() +{ + // do nothing +} + +void ConnectivityManagerImplWiFi::_OnWiFiScanDone() {} + +CHIP_ERROR ConnectivityManagerImplWiFi::_GetAndLogWiFiStatsCounters(void) +{ + // TODO: when network statistics are enabled + return CHIP_NO_ERROR; +} + +ConnectivityManager::WiFiAPMode ConnectivityManagerImplWiFi::_GetWiFiAPMode(void) +{ + /* AP mode is unsupported */ + return ConnectivityManager::WiFiAPMode::kWiFiAPMode_NotSupported; +} + +CHIP_ERROR ConnectivityManagerImplWiFi::_SetWiFiAPMode(ConnectivityManager::WiFiAPMode mode) +{ + /* AP mode is unsupported */ + VerifyOrReturnError(ConnectivityManager::WiFiAPMode::kWiFiAPMode_NotSupported == mode || + ConnectivityManager::WiFiAPMode::kWiFiAPMode_Disabled == mode, + CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + return CHIP_NO_ERROR; +} + +bool ConnectivityManagerImplWiFi::_IsWiFiAPActive(void) +{ + /* AP mode is unsupported */ + return false; +} + +bool ConnectivityManagerImplWiFi::_IsWiFiAPApplicationControlled(void) +{ + /* AP mode is unsupported */ + return false; +} + +void ConnectivityManagerImplWiFi::_DemandStartWiFiAP(void) +{ /* AP mode is unsupported */ +} + +void ConnectivityManagerImplWiFi::_StopOnDemandWiFiAP(void) +{ /* AP mode is unsupported */ +} + +void ConnectivityManagerImplWiFi::_MaintainOnDemandWiFiAP(void) +{ /* AP mode is unsupported */ +} + +System::Clock::Timeout ConnectivityManagerImplWiFi::_GetWiFiAPIdleTimeout(void) +{ + /* AP mode is unsupported */ + return System::Clock::kZero; +} + +void ConnectivityManagerImplWiFi::_SetWiFiAPIdleTimeout(System::Clock::Timeout val) +{ /* AP mode is unsupported */ +} + +} // namespace DeviceLayer +} // namespace chip + +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI diff --git a/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.h b/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.h new file mode 100644 index 00000000000000..ec9c1d12027af9 --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/ConnectivityManagerImplWiFi.h @@ -0,0 +1,80 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include + +#include + +namespace chip { +namespace Inet { +class IPAddress; +} // namespace Inet +} // namespace chip + +namespace chip { +namespace DeviceLayer { + +class ConnectivityManagerImplWiFi +{ + friend class ConnectivityManager; + +protected: + CHIP_ERROR InitWiFi(); + +private: + // Wi-Fi station + ConnectivityManager::WiFiStationMode _GetWiFiStationMode(void); + CHIP_ERROR _SetWiFiStationMode(ConnectivityManager::WiFiStationMode val); + bool _IsWiFiStationEnabled(void); + bool _IsWiFiStationApplicationControlled(void); + bool _IsWiFiStationConnected(void); + System::Clock::Timeout _GetWiFiStationReconnectInterval(void); + CHIP_ERROR _SetWiFiStationReconnectInterval(System::Clock::Timeout val); + bool _IsWiFiStationProvisioned(void); + void _ClearWiFiStationProvision(void); + CHIP_ERROR _GetAndLogWiFiStatsCounters(void); + bool _CanStartWiFiScan(); + void _OnWiFiScanDone(); + void _OnWiFiStationProvisionChange(); + + // Wi-Fi access point - not supported + ConnectivityManager::WiFiAPMode _GetWiFiAPMode(void); + CHIP_ERROR _SetWiFiAPMode(ConnectivityManager::WiFiAPMode val); + bool _IsWiFiAPActive(void); + bool _IsWiFiAPApplicationControlled(void); + void _DemandStartWiFiAP(void); + void _StopOnDemandWiFiAP(void); + void _MaintainOnDemandWiFiAP(void); + System::Clock::Timeout _GetWiFiAPIdleTimeout(void); + void _SetWiFiAPIdleTimeout(System::Clock::Timeout val); + + ConnectivityManager::WiFiStationMode mStationMode{ ConnectivityManager::WiFiStationMode::kWiFiStationMode_Disabled }; + ConnectivityManager::WiFiStationState mStationState{ ConnectivityManager::WiFiStationState::kWiFiStationState_NotConnected }; + System::Clock::Timeout mWiFiStationReconnectInterval{}; + + static const char * _WiFiStationModeToStr(ConnectivityManager::WiFiStationMode mode); + static const char * _WiFiAPModeToStr(ConnectivityManager::WiFiAPMode mode); + static const char * _WiFiStationStateToStr(ConnectivityManager::WiFiStationState state); + static const char * _WiFiAPStateToStr(ConnectivityManager::WiFiAPState state); +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/wifi/NxpWifiDriver.cpp b/src/platform/nxp/zephyr/wifi/NxpWifiDriver.cpp new file mode 100644 index 00000000000000..06a0b48f1e8c77 --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/NxpWifiDriver.cpp @@ -0,0 +1,298 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "NxpWifiDriver.h" + +#include + +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::DeviceLayer::Internal; +using namespace ::chip::DeviceLayer::PersistedStorage; +using namespace ::chip::app::Clusters::NetworkCommissioning; + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +size_t NxpWifiDriver::WiFiNetworkIterator::Count() +{ + VerifyOrReturnValue(mDriver != nullptr, 0); + return mDriver->mStagingNetwork.IsConfigured() ? 1 : 0; +} + +bool NxpWifiDriver::WiFiNetworkIterator::Next(Network & item) +{ + // we assume only one network is actually supported + // TODO: verify if this can be extended + if (mExhausted || 0 == Count()) + { + return false; + } + + memcpy(item.networkID, mDriver->mStagingNetwork.ssid, mDriver->mStagingNetwork.ssidLen); + item.networkIDLen = static_cast(mDriver->mStagingNetwork.ssidLen); + item.connected = false; + + mExhausted = true; + + WiFiManager::WiFiInfo wifiInfo; + if (CHIP_NO_ERROR == WiFiManager::Instance().GetWiFiInfo(wifiInfo)) + { + if (WiFiManager::StationStatus::CONNECTED <= WiFiManager::Instance().GetStationStatus()) + { + if (wifiInfo.mSsidLen == item.networkIDLen && 0 == memcmp(wifiInfo.mSsid, item.networkID, wifiInfo.mSsidLen)) + { + item.connected = true; + } + } + } + return true; +} + +bool NxpWifiScanResponseIterator::Next(WiFiScanResponse & item) +{ + if (mResultId < mResultCount) + { + item = mResults[mResultId++]; + return true; + } + return false; +} + +void NxpWifiScanResponseIterator::Release() +{ + mResultId = mResultCount = 0; + Platform::MemoryFree(mResults); + mResults = nullptr; +} + +void NxpWifiScanResponseIterator::Add(const WiFiScanResponse & result) +{ + void * newResults = Platform::MemoryRealloc(mResults, (mResultCount + 1) * sizeof(WiFiScanResponse)); + + if (newResults) + { + mResults = static_cast(newResults); + mResults[mResultCount++] = result; + } +} + +CHIP_ERROR NxpWifiDriver::Init(NetworkStatusChangeCallback * networkStatusChangeCallback) +{ + mpNetworkStatusChangeCallback = networkStatusChangeCallback; + + LoadFromStorage(); + + if (mStagingNetwork.IsConfigured()) + { + WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, + [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; + ReturnErrorOnFailure( + WiFiManager::Instance().Connect(mStagingNetwork.GetSsidSpan(), mStagingNetwork.GetPassSpan(), handling)); + } + + return CHIP_NO_ERROR; +} + +void NxpWifiDriver::OnNetworkStatusChanged(Status status) +{ + if (status == Status::kSuccess) + { + ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); + } + + if (mpNetworkStatusChangeCallback) + { + mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, NullOptional, NullOptional); + } + + if (mpConnectCallback) + { + mpConnectCallback->OnResult(status, CharSpan(), 0); + mpConnectCallback = nullptr; + } +} + +void NxpWifiDriver::Shutdown() +{ + mpNetworkStatusChangeCallback = nullptr; +} + +CHIP_ERROR NxpWifiDriver::CommitConfiguration() +{ + ReturnErrorOnFailure(KeyValueStoreMgr().Put(kPassKey, mStagingNetwork.pass, mStagingNetwork.passLen)); + ReturnErrorOnFailure(KeyValueStoreMgr().Put(kSsidKey, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR NxpWifiDriver::RevertConfiguration() +{ + // Abort Connection Recovery if it is in progress during reverting configuration. + // This is needed to stop recovery process after failsafe timer expiring. + WiFiManager::Instance().AbortConnectionRecovery(); + + LoadFromStorage(); + + if (WiFiManager::StationStatus::CONNECTING <= WiFiManager::Instance().GetStationStatus()) + { + WiFiManager::WiFiInfo wifiInfo; + ReturnErrorOnFailure(WiFiManager::Instance().GetWiFiInfo(wifiInfo)); + if (mStagingNetwork.GetSsidSpan().data_equal(ByteSpan(wifiInfo.mSsid, wifiInfo.mSsidLen))) + { + // we are already connected to this network, so return prematurely + return CHIP_NO_ERROR; + } + } + + if (mStagingNetwork.IsConfigured()) + { + WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, + [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; + ReturnErrorOnFailure( + WiFiManager::Instance().Connect(mStagingNetwork.GetSsidSpan(), mStagingNetwork.GetPassSpan(), handling)); + } + + return CHIP_NO_ERROR; +} + +Status NxpWifiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) +{ + outDebugText = {}; + outNetworkIndex = 0; + + VerifyOrReturnError(!mStagingNetwork.IsConfigured() || ssid.data_equal(mStagingNetwork.GetSsidSpan()), Status::kBoundsExceeded); + VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.pass), Status::kOutOfRange); + + mStagingNetwork.Erase(); + memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); + memcpy(mStagingNetwork.pass, credentials.data(), credentials.size()); + mStagingNetwork.ssidLen = ssid.size(); + mStagingNetwork.passLen = credentials.size(); + + return Status::kSuccess; +} + +Status NxpWifiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) +{ + outDebugText = {}; + outNetworkIndex = 0; + + VerifyOrReturnError(networkId.data_equal(mStagingNetwork.GetSsidSpan()), Status::kNetworkIDNotFound); + mStagingNetwork.Clear(); + + return Status::kSuccess; +} + +Status NxpWifiDriver::ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) +{ + outDebugText = {}; + + // Only one network is supported for now + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(networkId.data_equal(mStagingNetwork.GetSsidSpan()), Status::kNetworkIDNotFound); + + return Status::kSuccess; +} + +void NxpWifiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) +{ + Status status = Status::kSuccess; + WiFiManager::StationStatus stationStatus; + WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, + [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; + + VerifyOrExit(mpConnectCallback == nullptr, status = Status::kUnknownError); + mpConnectCallback = callback; + + stationStatus = WiFiManager::Instance().GetStationStatus(); + + VerifyOrExit(WiFiManager::StationStatus::CONNECTING != stationStatus, status = Status::kOtherConnectionFailure); + VerifyOrExit(networkId.data_equal(mStagingNetwork.GetSsidSpan()), status = Status::kNetworkIDNotFound); + + WiFiManager::Instance().Connect(mStagingNetwork.GetSsidSpan(), mStagingNetwork.GetPassSpan(), handling); + +exit: + if (mpConnectCallback != nullptr) + { + if (status == Status::kSuccess) + { + /* If the device is already connected to a network, send the success status right now to the cluster + * to make sure we have time to send command response before switch to another network */ + if (stationStatus >= WiFiManager::StationStatus::CONNECTED) + { + mpConnectCallback->OnResult(status, CharSpan(), 0); + mpConnectCallback = nullptr; + } + } + else + { + mpConnectCallback->OnResult(status, CharSpan(), 0); + mpConnectCallback = nullptr; + } + } +} + +void NxpWifiDriver::LoadFromStorage() +{ + WiFiManager::WiFiNetwork network; + + mStagingNetwork = {}; + ReturnOnFailure(KeyValueStoreMgr().Get(kSsidKey, network.ssid, sizeof(network.ssid), &network.ssidLen)); + ReturnOnFailure(KeyValueStoreMgr().Get(kPassKey, network.pass, sizeof(network.pass), &network.passLen)); + mStagingNetwork = network; +} + +void NxpWifiDriver::OnScanWiFiNetworkDone(WiFiManager::WiFiRequestStatus status) +{ + VerifyOrReturn(mScanCallback != nullptr); + mScanCallback->OnFinished(status == WiFiManager::WiFiRequestStatus::SUCCESS ? Status::kSuccess : Status::kUnknownError, + CharSpan(), &mScanResponseIterator); + mScanCallback = nullptr; +} + +void NxpWifiDriver::OnScanWiFiNetworkResult(const WiFiScanResponse & response) +{ + mScanResponseIterator.Add(response); +} + +void NxpWifiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callback) +{ + mScanCallback = callback; + CHIP_ERROR error = WiFiManager::Instance().Scan( + ssid, [](const WiFiScanResponse & response) { Instance().OnScanWiFiNetworkResult(response); }, + [](WiFiManager::WiFiRequestStatus status) { Instance().OnScanWiFiNetworkDone(status); }); + + if (error != CHIP_NO_ERROR) + { + mScanCallback = nullptr; + callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + } +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/wifi/NxpWifiDriver.h b/src/platform/nxp/zephyr/wifi/NxpWifiDriver.h new file mode 100644 index 00000000000000..01e4964e2ea046 --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/NxpWifiDriver.h @@ -0,0 +1,112 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "WiFiManager.h" + +#include + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +constexpr uint8_t kMaxWiFiNetworks = 1; +constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 35; + +class NxpWifiScanResponseIterator : public Iterator +{ +public: + size_t Count() override { return mResultCount; } + bool Next(WiFiScanResponse & item) override; + void Release() override; + void Add(const WiFiScanResponse & result); + +private: + size_t mResultId = 0; + size_t mResultCount = 0; + WiFiScanResponse * mResults = nullptr; +}; + +class NxpWifiDriver final : public WiFiDriver +{ +public: + // Define non-volatile storage keys for SSID and password. + // The naming convention is aligned with DefaultStorageKeyAllocator class. + static constexpr const char * kSsidKey = "g/wi/s"; + static constexpr const char * kPassKey = "g/wi/p"; + + class WiFiNetworkIterator final : public NetworkIterator + { + public: + WiFiNetworkIterator(NxpWifiDriver * aDriver) : mDriver(aDriver) {} + size_t Count() override; + bool Next(Network & item) override; + void Release() override { delete this; } + ~WiFiNetworkIterator() = default; + + private: + NxpWifiDriver * mDriver; + bool mExhausted{ false }; + }; + + // BaseDriver + NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } + CHIP_ERROR Init(NetworkStatusChangeCallback * networkStatusChangeCallback) override; + void Shutdown() override; + + // WirelessDriver + uint8_t GetMaxNetworks() override { return kMaxWiFiNetworks; } + uint8_t GetScanNetworkTimeoutSeconds() override { return kWiFiScanNetworksTimeOutSeconds; } + uint8_t GetConnectNetworkTimeoutSeconds() override { return kWiFiConnectNetworkTimeoutSeconds; } + + CHIP_ERROR CommitConfiguration() override; + CHIP_ERROR RevertConfiguration() override; + + Status RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; + Status ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) override; + void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; + + // WiFiDriver + Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) override; + void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + + static NxpWifiDriver & Instance() + { + static NxpWifiDriver sInstance; + return sInstance; + } + + void OnNetworkStatusChanged(Status status); + void OnScanWiFiNetworkResult(const WiFiScanResponse & result); + void OnScanWiFiNetworkDone(WiFiManager::WiFiRequestStatus status); + +private: + void LoadFromStorage(); + + ConnectCallback * mpConnectCallback{ nullptr }; + NetworkStatusChangeCallback * mpNetworkStatusChangeCallback{ nullptr }; + WiFiManager::WiFiNetwork mStagingNetwork; + NxpWifiScanResponseIterator mScanResponseIterator; + ScanCallback * mScanCallback{ nullptr }; +}; + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/wifi/WiFiManager.cpp b/src/platform/nxp/zephyr/wifi/WiFiManager.cpp new file mode 100644 index 00000000000000..946546288761b4 --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/WiFiManager.cpp @@ -0,0 +1,685 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides the wrapper for Zephyr WiFi API + */ + +#include "WiFiManager.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include + +// extern function to obtain bssid from status buffer +// It is defined in zephyr/subsys/net/ip/utils.c +extern char * net_sprint_ll_addr_buf(const uint8_t * ll, uint8_t ll_len, char * buf, int buflen); +} + +namespace chip { +namespace DeviceLayer { + +namespace { + +NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * result) +{ + NetworkCommissioning::WiFiScanResponse response = {}; + + if (result != nullptr) + { + static_assert(sizeof(response.ssid) == sizeof(result->ssid), "SSID length mismatch"); + static_assert(sizeof(response.bssid) == sizeof(result->mac), "BSSID length mismatch"); + + // TODO: Distinguish WPA versions + response.security.Set(result->security == WIFI_SECURITY_TYPE_PSK ? NetworkCommissioning::WiFiSecurity::kWpaPersonal + : NetworkCommissioning::WiFiSecurity::kUnencrypted); + response.channel = result->channel; + response.rssi = result->rssi; + response.ssidLen = result->ssid_length; + memcpy(response.ssid, result->ssid, result->ssid_length); + // TODO: MAC/BSSID is not filled by the Wi-Fi driver + memcpy(response.bssid, result->mac, result->mac_length); + } + + return response; +} + +// Matter expectations towards Wi-Fi version codes are unaligned with +// what wpa_supplicant provides. This function maps supplicant codes +// to the ones defined in the Matter spec (11.14.5.2. WiFiVersionEnum) +app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum MapToMatterWiFiVersionCode(wifi_link_mode wifiVersion) +{ + using app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum; + + if (wifiVersion < WIFI_1 || wifiVersion > WIFI_6E) + { + ChipLogError(DeviceLayer, "Unsupported Wi-Fi version detected"); + return WiFiVersionEnum::kA; // let's return 'a' by default + } + + switch (wifiVersion) + { + case WIFI_1: + return WiFiVersionEnum::kB; + case WIFI_2: + return WiFiVersionEnum::kA; + case WIFI_6E: + return WiFiVersionEnum::kAx; // treat as 802.11ax + default: + break; + } + + return static_cast(wifiVersion - 1); +} + +// Matter expectations towards Wi-Fi security type codes are unaligned with +// what wpa_supplicant provides. This function maps supplicant codes +// to the ones defined in the Matter spec (11.14.3.1. SecurityType enum) +app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum MapToMatterSecurityType(wifi_security_type securityType) +{ + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + + switch (securityType) + { + case WIFI_SECURITY_TYPE_NONE: + return SecurityTypeEnum::kNone; + case WIFI_SECURITY_TYPE_PSK: + case WIFI_SECURITY_TYPE_PSK_SHA256: + return SecurityTypeEnum::kWpa2; + case WIFI_SECURITY_TYPE_SAE: + return SecurityTypeEnum::kWpa3; + default: + break; + } + + return SecurityTypeEnum::kUnspecified; +} + +} // namespace + +const Map + WiFiManager::sStatusMap({ { WIFI_STATE_DISCONNECTED, WiFiManager::StationStatus::DISCONNECTED }, + { WIFI_STATE_INTERFACE_DISABLED, WiFiManager::StationStatus::DISABLED }, + { WIFI_STATE_INACTIVE, WiFiManager::StationStatus::DISABLED }, + { WIFI_STATE_SCANNING, WiFiManager::StationStatus::SCANNING }, + { WIFI_STATE_AUTHENTICATING, WiFiManager::StationStatus::CONNECTING }, + { WIFI_STATE_ASSOCIATING, WiFiManager::StationStatus::CONNECTING }, + { WIFI_STATE_ASSOCIATED, WiFiManager::StationStatus::CONNECTED }, + { WIFI_STATE_4WAY_HANDSHAKE, WiFiManager::StationStatus::PROVISIONING }, + { WIFI_STATE_GROUP_HANDSHAKE, WiFiManager::StationStatus::PROVISIONING }, + { WIFI_STATE_COMPLETED, WiFiManager::StationStatus::FULLY_PROVISIONED } }); + +const Map + WiFiManager::sEventHandlerMap({ { NET_EVENT_WIFI_SCAN_RESULT, WiFiManager::ScanResultHandler }, + { NET_EVENT_WIFI_SCAN_DONE, WiFiManager::ScanDoneHandler }, + { NET_EVENT_WIFI_CONNECT_RESULT, WiFiManager::ConnectHandler }, + { NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::NetworkDrivenDisconnectHandler }, + { NET_EVENT_WIFI_DISCONNECT_COMPLETE, WiFiManager::ApplicationDrivenDisconnectHandler } }); + +void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface) +{ + if (0 == strcmp(iface->if_dev->dev->name, InetUtils::GetInterface()->if_dev->dev->name)) + { + Platform::UniquePtr eventData(new uint8_t[cb->info_length]); + VerifyOrReturn(eventData); + memcpy(eventData.get(), cb->info, cb->info_length); + sEventHandlerMap[mgmtEvent](std::move(eventData)); + } +} + +CHIP_ERROR WiFiManager::Init() +{ + // TODO: consider moving these to ConnectivityManagerImpl to be prepared for handling multiple interfaces on a single device. + Inet::UDPEndPointImplSockets::SetJoinMulticastGroupHandler([](Inet::InterfaceId interfaceId, const Inet::IPAddress & address) { + const in6_addr addr = InetUtils::ToZephyrAddr(address); + net_if * iface = InetUtils::GetInterface(interfaceId); + VerifyOrReturnError(iface != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + + net_if_mcast_addr * maddr = net_if_ipv6_maddr_add(iface, &addr); + + if (maddr && !net_if_ipv6_maddr_is_joined(maddr) && !net_ipv6_is_addr_mcast_link_all_nodes(&addr)) + { + net_if_ipv6_maddr_join(iface, maddr); + } + + return CHIP_NO_ERROR; + }); + + Inet::UDPEndPointImplSockets::SetLeaveMulticastGroupHandler([](Inet::InterfaceId interfaceId, const Inet::IPAddress & address) { + const in6_addr addr = InetUtils::ToZephyrAddr(address); + net_if * iface = InetUtils::GetInterface(interfaceId); + VerifyOrReturnError(iface != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + + if (!net_ipv6_is_addr_mcast_link_all_nodes(&addr) && !net_if_ipv6_maddr_rm(iface, &addr)) + { + return CHIP_ERROR_INVALID_ADDRESS; + } + + return CHIP_NO_ERROR; + }); + + net_mgmt_init_event_callback(&mWiFiMgmtClbk, WifiMgmtEventHandler, kWifiManagementEvents); + net_mgmt_add_event_callback(&mWiFiMgmtClbk); + + ChipLogDetail(DeviceLayer, "WiFiManager has been initialized"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR WiFiManager::Scan(const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback, + bool internalScan) +{ + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + + mInternalScan = internalScan; + mScanResultCallback = resultCallback; + mScanDoneCallback = doneCallback; + mCachedWiFiState = mWiFiState; + mWiFiState = WIFI_STATE_SCANNING; + mSsidFound = false; + mRecoveryArmed = true; + // TODO Workaround for recovery mechanism to wait before the next scan request until the WiFi supplicant is not busy. + static bool workaroundDone; + + /* If the ssid is not null, it means the scan must target a specific SSID, and only include this one in the scan + * result. To do so, we save the requested ssid and we will filter the scan results accordingly in the scan done + * handler. */ + if ((ssid.size() > 0) && (!mInternalScan)) + { + mNetworkToScan.Erase(); + memcpy(mNetworkToScan.ssid, ssid.data(), ssid.size()); + mNetworkToScan.ssidLen = ssid.size(); + } + + int ret = net_mgmt(NET_REQUEST_WIFI_SCAN, iface, NULL, 0); + + if (ret) + { + ChipLogError(DeviceLayer, "Scan request failed %d", ret); + if (ret == -EBUSY && !workaroundDone) + { + // TODO Wi-Fi driver returned an error during recovery. + // As a workaround schedule the recovery timer one more time in WifiSupplicantWorkaroundTime time. + // This allows the device to run the Scan method without + // rebooting when the "Device or resource busy" error occurs. + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kWifiSupplicantWorkaroundTime), Recover, nullptr); + workaroundDone = true; + return CHIP_NO_ERROR; + } + else + { + // TODO The workaround has not worked, so reboot the device + ChipLogError(DeviceLayer, "WiFi driver does not respond, resetting the device..."); + workaroundDone = false; + PlatformMgr().Shutdown(); + } + return CHIP_ERROR_INTERNAL; + } + + ChipLogDetail(DeviceLayer, "WiFi scanning started..."); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR WiFiManager::ClearStationProvisioningData() +{ + mWiFiParams.mRssi = std::numeric_limits::min(); + memset(&mWiFiParams.mParams, 0, sizeof(mWiFiParams.mParams)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR WiFiManager::Connect(const ByteSpan & ssid, const ByteSpan & credentials, const ConnectionHandling & handling) +{ + ChipLogDetail(DeviceLayer, "Connecting to WiFi network: %.*s", ssid.size(), ssid.data()); + + mHandling.mOnConnectionSuccess = handling.mOnConnectionSuccess; + mHandling.mOnConnectionFailed = handling.mOnConnectionFailed; + mHandling.mConnectionTimeout = handling.mConnectionTimeout; + + mWiFiState = WIFI_STATE_ASSOCIATING; + + // Store SSID and credentials and perform the scan to detect the security mode supported by the AP. + // Zephyr WiFi connect request will be issued in the callback when we have the SSID match. + mWantedNetwork.Erase(); + memcpy(mWantedNetwork.ssid, ssid.data(), ssid.size()); + memcpy(mWantedNetwork.pass, credentials.data(), credentials.size()); + mWantedNetwork.ssidLen = ssid.size(); + mWantedNetwork.passLen = credentials.size(); + + return Scan(ssid, nullptr, nullptr, true /* internal scan */); +} + +CHIP_ERROR WiFiManager::Disconnect() +{ + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + + mApplicationDisconnectRequested = true; + int status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, iface, NULL, 0); + + if (status) + { + mApplicationDisconnectRequested = false; + if (status == -EALREADY) + { + ChipLogDetail(DeviceLayer, "Already disconnected"); + } + else + { + ChipLogDetail(DeviceLayer, "Disconnect request failed"); + return CHIP_ERROR_INTERNAL; + } + } + else + { + ChipLogDetail(DeviceLayer, "Disconnect requested"); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR WiFiManager::GetWiFiInfo(WiFiInfo & info) const +{ + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + struct wifi_iface_status status = { 0 }; + + if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, iface, &status, sizeof(struct wifi_iface_status))) + { + ChipLogError(DeviceLayer, "Status request failed"); + return CHIP_ERROR_INTERNAL; + } + + if (status.state >= WIFI_STATE_ASSOCIATED) + { + info.mSecurityType = MapToMatterSecurityType(status.security); + info.mWiFiVersion = MapToMatterWiFiVersionCode(status.link_mode); + info.mRssi = static_cast(status.rssi); + info.mChannel = static_cast(status.channel); + info.mSsidLen = status.ssid_len; + memcpy(info.mSsid, status.ssid, status.ssid_len); + memcpy(info.mBssId, status.bssid, sizeof(status.bssid)); + + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_INTERNAL; +} + +CHIP_ERROR WiFiManager::GetNetworkStatistics(NetworkStatistics & stats) const +{ + net_stats_wifi data{}; + net_mgmt(NET_REQUEST_STATS_GET_WIFI, InetUtils::GetInterface(), &data, sizeof(data)); + + stats.mPacketMulticastRxCount = data.multicast.rx; + stats.mPacketMulticastTxCount = data.multicast.tx; + stats.mPacketUnicastRxCount = data.pkts.rx - data.multicast.rx - data.broadcast.rx; + stats.mPacketUnicastTxCount = data.pkts.tx - data.multicast.tx - data.broadcast.tx; + stats.mBeaconsSuccessCount = data.sta_mgmt.beacons_rx; + stats.mBeaconsLostCount = data.sta_mgmt.beacons_miss; + + return CHIP_NO_ERROR; +} + +void WiFiManager::ScanResultHandler(Platform::UniquePtr data) +{ + // Contrary to other handlers, offload accumulating of the scan results from the CHIP thread to the caller's thread + const struct wifi_scan_result * scanResult = reinterpret_cast(data.get()); + + if (Instance().mInternalScan && + Instance().mWantedNetwork.GetSsidSpan().data_equal(ByteSpan(scanResult->ssid, scanResult->ssid_length))) + { + // Prepare the connection parameters + // In case there are many networks with the same SSID choose the one with the best RSSI + if (scanResult->rssi > Instance().mWiFiParams.mRssi) + { + Instance().ClearStationProvisioningData(); + Instance().mWiFiParams.mParams.ssid_length = static_cast(Instance().mWantedNetwork.ssidLen); + Instance().mWiFiParams.mParams.ssid = Instance().mWantedNetwork.ssid; + // Fallback to the WIFI_SECURITY_TYPE_PSK if the security is unknown + Instance().mWiFiParams.mParams.security = + scanResult->security <= WIFI_SECURITY_TYPE_MAX ? scanResult->security : WIFI_SECURITY_TYPE_PSK; + Instance().mWiFiParams.mParams.psk_length = static_cast(Instance().mWantedNetwork.passLen); + Instance().mWiFiParams.mParams.mfp = (scanResult->mfp == WIFI_MFP_REQUIRED) ? WIFI_MFP_REQUIRED : WIFI_MFP_OPTIONAL; + + // If the security is none, WiFi driver expects the psk to be nullptr + if (Instance().mWiFiParams.mParams.security == WIFI_SECURITY_TYPE_NONE) + { + Instance().mWiFiParams.mParams.psk = nullptr; + } + else + { + Instance().mWiFiParams.mParams.psk = Instance().mWantedNetwork.pass; + } + + Instance().mWiFiParams.mParams.timeout = Instance().mHandling.mConnectionTimeout.count(); + Instance().mWiFiParams.mParams.channel = WIFI_CHANNEL_ANY; + Instance().mWiFiParams.mRssi = scanResult->rssi; + Instance().mSsidFound = true; + } + } + + if (Instance().mScanResultCallback && !Instance().mInternalScan) + { + /* Here we need to check if the scan is targeting a specific network and filter the scan result accordingly, + * to make sure only the targeted SSID is reported */ + if (Instance().mNetworkToScan.GetSsidSpan().size() == 0) + { + Instance().mScanResultCallback(ToScanResponse(scanResult)); + } + else if (Instance().mNetworkToScan.GetSsidSpan().data_equal(ByteSpan(scanResult->ssid, scanResult->ssid_length))) + { + Instance().mScanResultCallback(ToScanResponse(scanResult)); + } + } +} + +void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) +{ + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { + Platform::UniquePtr safePtr(capturedData); + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + WiFiRequestStatus requestStatus = static_cast(status->status); + + /* Reset the specific network to scan */ + if (Instance().mNetworkToScan.GetSsidSpan().size() > 0) + { + Instance().mNetworkToScan.Erase(); + } + + if (requestStatus == WiFiRequestStatus::FAILURE) + { + ChipLogError(DeviceLayer, "Wi-Fi scan finalization failure (%d)", status->status); + } + else + { + ChipLogProgress(DeviceLayer, "Wi-Fi scan done (%d)", status->status); + } + + if (Instance().mScanDoneCallback && !Instance().mInternalScan) + { + Instance().mScanDoneCallback(requestStatus); + // restore the connection state from before the scan request was issued + Instance().mWiFiState = Instance().mCachedWiFiState; + return; + } + + // Internal scan is supposed to be followed by a connection request if the SSID has been found + if (Instance().mInternalScan) + { + if (Instance().mRecoveryArmed) + { + if (!Instance().mSsidFound) + { + ChipLogProgress(DeviceLayer, "No requested SSID found"); + auto currentTimeout = Instance().CalculateNextRecoveryTime(); + ChipLogProgress(DeviceLayer, "Starting connection recover: re-scanning... (next attempt in %d ms)", + currentTimeout.count()); + DeviceLayer::SystemLayer().StartTimer(currentTimeout, Recover, nullptr); + return; + } + else + { + Instance().AbortConnectionRecovery(); + } + } + + Instance().mWiFiState = WIFI_STATE_ASSOCIATING; + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturn(nullptr != iface, CHIP_ERROR_INTERNAL); + + if (net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, &(Instance().mWiFiParams.mParams), sizeof(wifi_connect_req_params))) + { + ChipLogError(DeviceLayer, "Connection request failed"); + if (Instance().mHandling.mOnConnectionFailed) + { + Instance().mHandling.mOnConnectionFailed(); + } + Instance().mWiFiState = WIFI_STATE_DISCONNECTED; + return; + } + ChipLogProgress(DeviceLayer, "Connection to %*s requested [RSSI=%d]", Instance().mWiFiParams.mParams.ssid_length, + Instance().mWiFiParams.mParams.ssid, Instance().mWiFiParams.mRssi); + Instance().mInternalScan = false; + } + }); + + if (CHIP_NO_ERROR == err) + { + // the ownership has been transferred to the worker thread - release the buffer + data.release(); + } +} + +void WiFiManager::SendRouterSolicitation(System::Layer * layer, void * param) +{ + net_if * iface = InetUtils::GetInterface(); + if (iface && iface->if_dev->link_addr.type == NET_LINK_ETHERNET) + { + net_if_start_rs(iface); + Instance().mRouterSolicitationCounter++; + if (Instance().mRouterSolicitationCounter < kRouterSolicitationMaxCount) + { + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kRouterSolicitationIntervalMs), + SendRouterSolicitation, nullptr); + } + else + { + Instance().mRouterSolicitationCounter = 0; + } + } +} + +void WiFiManager::ConnectHandler(Platform::UniquePtr data) +{ + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { + Platform::UniquePtr safePtr(capturedData); + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + WiFiRequestStatus requestStatus = static_cast(status->status); + + if (requestStatus == WiFiRequestStatus::FAILURE || requestStatus == WiFiRequestStatus::TERMINATED) + { + ChipLogProgress(DeviceLayer, "Connection to WiFi network failed or was terminated by another request"); + Instance().mWiFiState = WIFI_STATE_DISCONNECTED; + if (Instance().mHandling.mOnConnectionFailed) + { + Instance().mHandling.mOnConnectionFailed(); + } + } + else // The connection has been established successfully. + { + // Workaround needed until sending Router Solicitation after connect will be done by the driver. + DeviceLayer::SystemLayer().StartTimer( + System::Clock::Milliseconds32(chip::Crypto::GetRandU16() % kMaxInitialRouterSolicitationDelayMs), + SendRouterSolicitation, nullptr); + + ChipLogProgress(DeviceLayer, "Connected to WiFi network"); + Instance().mWiFiState = WIFI_STATE_COMPLETED; + if (Instance().mHandling.mOnConnectionSuccess) + { + Instance().mHandling.mOnConnectionSuccess(); + } + Instance().PostConnectivityStatusChange(kConnectivity_Established); + + // Workaround needed to re-initialize mDNS server after Wi-Fi interface is operative + chip::DeviceLayer::ChipDeviceEvent event; + event.Type = chip::DeviceLayer::DeviceEventType::kDnssdInitialized; + + CHIP_ERROR error = chip::DeviceLayer::PlatformMgr().PostEvent(&event); + if (error != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Cannot post event [error: %s]", ErrorStr(error)); + } + } + // Ensure fresh recovery for future connection requests. + Instance().ResetRecoveryTime(); + // cleanup the provisioning data as it is configured per each connect request + Instance().ClearStationProvisioningData(); + }); + + if (CHIP_NO_ERROR == err) + { + // the ownership has been transferred to the worker thread - release the buffer + data.release(); + } +} + +void WiFiManager::NetworkDrivenDisconnectHandler(Platform::UniquePtr) +{ + // Workaround: schedule the application level connection recovery in kSupplicantReconnectionTimeoutMs to give WPA supplicant + // some time to restore it. + if (!Instance().mRecoveryArmed) + { + Instance().mRecoveryArmed = true; + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kSupplicantReconnectionTimeoutMs), Recover, nullptr); + } + + SystemLayer().ScheduleLambda([] { + ChipLogProgress(DeviceLayer, "WiFi station disconnected"); + Instance().mWiFiState = WIFI_STATE_DISCONNECTED; + Instance().PostConnectivityStatusChange(kConnectivity_Lost); + }); +} + +void WiFiManager::ApplicationDrivenDisconnectHandler(Platform::UniquePtr) +{ + if (!Instance().mRecoveryArmed) + { + return; + } + + if (!Instance().mApplicationDisconnectRequested) + { + Instance().AbortConnectionRecovery(); + } + else + { + Instance().mApplicationDisconnectRequested = false; + SystemLayer().ScheduleLambda([] { Recover(nullptr, nullptr); }); + } +} + +WiFiManager::StationStatus WiFiManager::GetStationStatus() const +{ + return WiFiManager::sStatusMap[mWiFiState]; +} + +void WiFiManager::PostConnectivityStatusChange(ConnectivityChange changeType) +{ + ChipDeviceEvent networkEvent{}; + networkEvent.Type = DeviceEventType::kWiFiConnectivityChange; + networkEvent.WiFiConnectivityChange.Result = changeType; + PlatformMgr().PostEventOrDie(&networkEvent); +} + +System::Clock::Milliseconds32 WiFiManager::CalculateNextRecoveryTime() +{ + if (mConnectionRecoveryTimeMs > kConnectionRecoveryMaxIntervalMs) + { + // Find the new random jitter value in range [-jitter, +jitter]. + int32_t jitter = chip::Crypto::GetRandU32() % (2 * jitter + 1) - jitter; + mConnectionRecoveryTimeMs = kConnectionRecoveryMaxIntervalMs + jitter; + return System::Clock::Milliseconds32(mConnectionRecoveryTimeMs); + } + else + { + uint32_t currentRecoveryTimeout = mConnectionRecoveryTimeMs; + mConnectionRecoveryTimeMs = mConnectionRecoveryTimeMs * 2; + return System::Clock::Milliseconds32(currentRecoveryTimeout); + } +} + +void WiFiManager::Recover(System::Layer *, void *) +{ + // Prevent scheduling recovery if we are already connected to the network. + if (Instance().mWiFiState == WIFI_STATE_COMPLETED) + { + Instance().AbortConnectionRecovery(); + return; + } + + // If kConnectionRecoveryMaxOverallInterval has a non-zero value prevent endless re-scan. + if (0 != kConnectionRecoveryMaxRetries && (++Instance().mConnectionRecoveryCounter >= kConnectionRecoveryMaxRetries)) + { + Instance().AbortConnectionRecovery(); + return; + } + + Instance().Scan(Instance().mWantedNetwork.GetSsidSpan(), nullptr, nullptr, true /* internal scan */); +} + +void WiFiManager::ResetRecoveryTime() +{ + mConnectionRecoveryTimeMs = kConnectionRecoveryMinIntervalMs; + mConnectionRecoveryCounter = 0; +} + +void WiFiManager::AbortConnectionRecovery() +{ + DeviceLayer::SystemLayer().CancelTimer(Recover, nullptr); + Instance().ResetRecoveryTime(); + Instance().mRecoveryArmed = false; +} + +CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) +{ + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + + wifi_ps_config currentConfig{}; + if (net_mgmt(NET_REQUEST_WIFI_PS_CONFIG, iface, ¤tConfig, sizeof(currentConfig))) + { + ChipLogError(DeviceLayer, "Get current low power mode config request failed"); + return CHIP_ERROR_INTERNAL; + } + + if ((currentConfig.ps_params.enabled == WIFI_PS_ENABLED && onoff == false) || + (currentConfig.ps_params.enabled == WIFI_PS_DISABLED && onoff == true)) + { + wifi_ps_params params{ .enabled = onoff ? WIFI_PS_ENABLED : WIFI_PS_DISABLED }; + if (net_mgmt(NET_REQUEST_WIFI_PS, iface, ¶ms, sizeof(params))) + { + ChipLogError(DeviceLayer, "Set low power mode request failed"); + return CHIP_ERROR_INTERNAL; + } + ChipLogProgress(DeviceLayer, "Successfully set low power mode [%d]", onoff); + return CHIP_NO_ERROR; + } + + ChipLogDetail(DeviceLayer, "Low power mode is already in requested state [%d]", onoff); + return CHIP_NO_ERROR; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/zephyr/wifi/WiFiManager.h b/src/platform/nxp/zephyr/wifi/WiFiManager.h new file mode 100644 index 00000000000000..29f2ef299af1aa --- /dev/null +++ b/src/platform/nxp/zephyr/wifi/WiFiManager.h @@ -0,0 +1,253 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides the wrapper for Zephyr wpa_supplicant API + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include +#include + +extern "C" { +#include +#include +} + +struct net_if; +struct wpa_ssid; +using WpaNetwork = struct wpa_ssid; + +namespace chip { +namespace DeviceLayer { + +// emulation of dictionary - might be moved to utils +template +class Map +{ + struct Pair + { + T1 key; + T2 value; + }; + +public: + Map(const Pair (&list)[N]) + { + int idx{ 0 }; + for (const auto & pair : list) + { + mMap[idx++] = pair; + } + } + + T2 operator[](const T1 & key) const + { + for (const auto & it : mMap) + { + if (key == it.key) + return it.value; + } + + return T2{}; + } + + Map() = delete; + Map(const Map &) = delete; + Map(Map &&) = delete; + Map & operator=(const Map &) = delete; + Map & operator=(Map &&) = delete; + ~Map() = default; + +private: + Pair mMap[N]; +}; + +class WiFiManager +{ +public: + enum WiFiRequestStatus : int + { + SUCCESS = 0, + FAILURE = 1, + TERMINATED = 2 + }; + + using ScanResultCallback = void (*)(const NetworkCommissioning::WiFiScanResponse &); + using ScanDoneCallback = void (*)(WiFiRequestStatus); + using ConnectionCallback = void (*)(); + + enum class StationStatus : uint8_t + { + NONE, + DISCONNECTED, + DISABLED, + SCANNING, + CONNECTING, + CONNECTED, + PROVISIONING, + FULLY_PROVISIONED, + UNKNOWN + }; + + static WiFiManager & Instance() + { + static WiFiManager sInstance; + return sInstance; + } + + struct ConnectionHandling + { + ConnectionCallback mOnConnectionSuccess{}; + ConnectionCallback mOnConnectionFailed{}; + System::Clock::Seconds32 mConnectionTimeout{}; + }; + + struct WiFiInfo + { + uint8_t mBssId[DeviceLayer::Internal::kWiFiBSSIDLength]; + app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum mSecurityType{}; + app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum mWiFiVersion{}; + uint16_t mChannel{}; + int8_t mRssi{}; + uint8_t mSsid[DeviceLayer::Internal::kMaxWiFiSSIDLength]; + size_t mSsidLen{ 0 }; + }; + + struct NetworkStatistics + { + uint32_t mPacketMulticastRxCount{}; + uint32_t mPacketMulticastTxCount{}; + uint32_t mPacketUnicastRxCount{}; + uint32_t mPacketUnicastTxCount{}; + uint32_t mBeaconsSuccessCount{}; + uint32_t mBeaconsLostCount{}; + }; + + struct WiFiNetwork + { + uint8_t ssid[DeviceLayer::Internal::kMaxWiFiSSIDLength]; + size_t ssidLen = 0; + uint8_t pass[DeviceLayer::Internal::kMaxWiFiKeyLength]; + size_t passLen = 0; + + bool IsConfigured() const { return ssidLen > 0; } + ByteSpan GetSsidSpan() const { return ByteSpan(ssid, ssidLen); } + ByteSpan GetPassSpan() const { return ByteSpan(pass, passLen); } + void Clear() { ssidLen = 0; } + void Erase() + { + memset(ssid, 0, DeviceLayer::Internal::kMaxWiFiSSIDLength); + memset(pass, 0, DeviceLayer::Internal::kMaxWiFiKeyLength); + ssidLen = 0; + passLen = 0; + } + }; + + static constexpr uint16_t kRouterSolicitationIntervalMs = 4000; + static constexpr uint16_t kMaxInitialRouterSolicitationDelayMs = 1000; + static constexpr uint8_t kRouterSolicitationMaxCount = 3; + static constexpr uint32_t kConnectionRecoveryMinIntervalMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MINIMUM_INTERVAL; + static constexpr uint32_t kConnectionRecoveryMaxIntervalMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL; + static constexpr uint32_t kConnectionRecoveryJitterMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_JITTER; + static constexpr uint32_t kConnectionRecoveryMaxRetries = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER; + static constexpr uint32_t kSupplicantReconnectionTimeoutMs = 60000; + + static_assert(kConnectionRecoveryMinIntervalMs < kConnectionRecoveryMaxIntervalMs); + static_assert(kConnectionRecoveryJitterMs <= kConnectionRecoveryMaxIntervalMs); + + CHIP_ERROR Init(); + CHIP_ERROR Scan(const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback, + bool internalScan = false); + CHIP_ERROR Connect(const ByteSpan & ssid, const ByteSpan & credentials, const ConnectionHandling & handling); + StationStatus GetStationStatus() const; + CHIP_ERROR ClearStationProvisioningData(); + CHIP_ERROR Disconnect(); + CHIP_ERROR GetWiFiInfo(WiFiInfo & info) const; + CHIP_ERROR GetNetworkStatistics(NetworkStatistics & stats) const; + void AbortConnectionRecovery(); + CHIP_ERROR SetLowPowerMode(bool onoff); + +private: + using NetEventHandler = void (*)(Platform::UniquePtr); + + struct ConnectionParams + { + wifi_connect_req_params mParams; + int8_t mRssi{ std::numeric_limits::min() }; + }; + + constexpr static uint32_t kWifiManagementEvents = NET_EVENT_WIFI_SCAN_RESULT | NET_EVENT_WIFI_SCAN_DONE | + NET_EVENT_WIFI_CONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_COMPLETE | + NET_EVENT_WIFI_IFACE_STATUS; + + // Event handling + static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); + static void ScanResultHandler(Platform::UniquePtr data); + static void ScanDoneHandler(Platform::UniquePtr data); + static void ConnectHandler(Platform::UniquePtr data); + static void NetworkDrivenDisconnectHandler(Platform::UniquePtr data); + static void ApplicationDrivenDisconnectHandler(Platform::UniquePtr data); + static void PostConnectivityStatusChange(ConnectivityChange changeType); + static void SendRouterSolicitation(System::Layer * layer, void * param); + + // Connection Recovery feature + // This feature allows re-scanning and re-connecting the connection to the known network after + // a reboot or when a connection is lost. The following attempts will occur with increasing interval. + // The connection recovery interval starts from kConnectionRecoveryMinIntervalMs and is doubled + // with each occurrence until reaching kConnectionRecoveryMaxIntervalMs. + // When the connection recovery interval reaches the maximum value the randomized kConnectionRecoveryJitterMs + // from the range [-jitter, +jitter] is added to the value to avoid the periodicity. + // To avoid frequent recovery attempts when the signal to an access point is poor quality + // The connection recovery interval will be cleared after the defined delay in kConnectionRecoveryDelayToReset. + static void Recover(System::Layer * layer, void * param); + void ResetRecoveryTime(); + System::Clock::Milliseconds32 CalculateNextRecoveryTime(); + + ConnectionParams mWiFiParams{}; + ConnectionHandling mHandling; + wifi_iface_state mWiFiState; + wifi_iface_state mCachedWiFiState; + net_mgmt_event_callback mWiFiMgmtClbk{}; + ScanResultCallback mScanResultCallback{ nullptr }; + ScanDoneCallback mScanDoneCallback{ nullptr }; + WiFiNetwork mWantedNetwork{}; + WiFiNetwork mNetworkToScan{}; + bool mInternalScan{ false }; + uint8_t mRouterSolicitationCounter = 0; + bool mSsidFound{ false }; + uint32_t mConnectionRecoveryCounter{ 0 }; + uint32_t mConnectionRecoveryTimeMs{ kConnectionRecoveryMinIntervalMs }; + bool mRecoveryArmed{ false }; + bool mApplicationDisconnectRequested{ false }; + // TODO Workaround for recovery mechanism to wait before the next scan request until the WiFi supplicant is not busy. + static constexpr uint32_t kWifiSupplicantWorkaroundTime = 8000; + + static const Map sStatusMap; + static const Map sEventHandlerMap; +}; + +} // namespace DeviceLayer +} // namespace chip From f8083eea1d633390c24792dc475b305d7ebcd48d Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Fri, 26 Jan 2024 01:44:04 +0900 Subject: [PATCH 34/45] Remove unused files in java, android (#31675) * Remove unused file in java * Restyled by autopep8 * Update remove test file --------- Co-authored-by: Restyled.io --- scripts/py_matter_idl/BUILD.gn | 14 - scripts/py_matter_idl/files.gni | 5 - .../generators/java/CHIPCallbackTypes.jinja | 40 - .../java/CHIPGlobalCallbacks_cpp.jinja | 76 - .../generators/java/CHIPReadCallbacks_h.jinja | 81 - .../generators/java/ChipClustersCpp.jinja | 216 - .../generators/java/ChipClustersRead.jinja | 54 - .../matter_idl/generators/java/__init__.py | 51 - .../matter_idl/tests/available_tests.yaml | 40 - .../jni/CHIPCallbackTypes.h | 28 - .../jni/CHIPReadReadCallbacks.h | 393 - .../DemoClusterClient-InvokeSubscribeImpl.cpp | 58 - .../jni/DemoClusterClient-ReadImpl.cpp | 38 - .../jni/CHIPCallbackTypes.h | 28 - .../jni/CHIPReadReadCallbacks.h | 393 - .../DemoClusterClient-InvokeSubscribeImpl.cpp | 58 - .../jni/DemoClusterClient-ReadImpl.cpp | 38 - .../optional_argument/jni/CHIPCallbackTypes.h | 26 - .../jni/CHIPReadReadCallbacks.h | 341 - .../MyClusterClient-InvokeSubscribeImpl.cpp | 81 - .../jni/MyClusterClient-ReadImpl.cpp | 14 - .../several_clusters/jni/CHIPCallbackTypes.h | 31 - .../jni/CHIPReadReadCallbacks.h | 423 - .../jni/FirstClient-InvokeSubscribeImpl.cpp | 58 - .../jni/FirstClient-ReadImpl.cpp | 38 - .../jni/SecondClient-InvokeSubscribeImpl.cpp | 79 - .../jni/SecondClient-ReadImpl.cpp | 62 - .../jni/ThirdClient-InvokeSubscribeImpl.cpp | 79 - .../jni/ThirdClient-ReadImpl.cpp | 62 - .../shared/jni/CHIPGlobalCallbacks.cpp | 603 - .../simple_attribute/jni/CHIPCallbackTypes.h | 27 - .../jni/CHIPReadReadCallbacks.h | 341 - .../MyClusterClient-InvokeSubscribeImpl.cpp | 58 - .../jni/MyClusterClient-ReadImpl.cpp | 38 - scripts/py_matter_idl/setup.cfg | 4 - src/controller/data_model/BUILD.gn | 268 - .../java/templates/CHIPClientCallbacks.zapt | 21 - .../java/templates/CHIPClustersWrite-JNI.zapt | 81 - .../templates/CHIPInvokeCallbacks-src.zapt | 74 - .../java/templates/CHIPInvokeCallbacks.zapt | 27 - .../java/templates/CHIPReadCallbacks-src.zapt | 101 - src/controller/java/templates/templates.json | 25 - .../java/zap-generated/CHIPClientCallbacks.h | 1234 - .../zap-generated/CHIPClustersWrite-JNI.cpp | 15221 ---- .../zap-generated/CHIPInvokeCallbacks.cpp | 8525 --- .../java/zap-generated/CHIPInvokeCallbacks.h | 1185 - .../java/zap-generated/CHIPReadCallbacks.cpp | 63402 ---------------- 47 files changed, 94140 deletions(-) delete mode 100644 scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/shared/jni/CHIPGlobalCallbacks.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp delete mode 100644 src/controller/java/templates/CHIPClientCallbacks.zapt delete mode 100644 src/controller/java/templates/CHIPClustersWrite-JNI.zapt delete mode 100644 src/controller/java/templates/CHIPInvokeCallbacks-src.zapt delete mode 100644 src/controller/java/templates/CHIPInvokeCallbacks.zapt delete mode 100644 src/controller/java/templates/CHIPReadCallbacks-src.zapt delete mode 100644 src/controller/java/zap-generated/CHIPClientCallbacks.h delete mode 100644 src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp delete mode 100644 src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp delete mode 100644 src/controller/java/zap-generated/CHIPInvokeCallbacks.h delete mode 100644 src/controller/java/zap-generated/CHIPReadCallbacks.cpp diff --git a/scripts/py_matter_idl/BUILD.gn b/scripts/py_matter_idl/BUILD.gn index 9fef16e43e24ad..13624f99d112b6 100644 --- a/scripts/py_matter_idl/BUILD.gn +++ b/scripts/py_matter_idl/BUILD.gn @@ -38,26 +38,12 @@ pw_python_package("matter_idl") { "matter_idl/tests/inputs/optional_argument.matter", "matter_idl/tests/inputs/several_clusters.matter", "matter_idl/tests/inputs/simple_attribute.matter", - "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", - "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", - "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp", - "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/several_clusters/java/ChipClusters.java", "matter_idl/tests/outputs/several_clusters/java/ChipEventStructs.java", "matter_idl/tests/outputs/several_clusters/java/ChipStructs.java", "matter_idl/tests/outputs/several_clusters/java/ClusterInfoMapping.java", "matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java", "matter_idl/tests/outputs/several_clusters/java/ClusterWriteMapping.java", - "matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp", - "matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp", - "matter_idl/tests/outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp", - "matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp", - "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp", ] sources = matter_idl_generator_sources diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index fa33ffba150927..d3709a1bac52c1 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -9,12 +9,7 @@ matter_idl_generator_templates = [ "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/TLVMetaData_cpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/TLVMetaData_h.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterReadMapping.jinja", diff --git a/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja b/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja deleted file mode 100644 index 2cc43bc99b0d7e..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - -{% for cluster in clientClusters | sort(attribute='code') %} - {%- for response in cluster.structs | select('is_response_struct') -%} -typedef void (*CHIP{{cluster.name}}Cluster{{response.name}}CallbackType)(void *, const chip::app::Clusters::{{cluster.name}}::Commands::{{response.name}}::DecodableType &); - {%- endfor -%} - - {#- TODO: global response types? -#} - {%- for attribute in cluster.attributes | sort(attribute='name') %} -typedef void (*CHIP{{cluster.name}}Cluster{{attribute.definition.name | upfirst}}AttributeCallbackType)(void *, {##} - {%- if attribute.definition.is_list -%} - const chip::app::Clusters::{{cluster.name}}::Attributes::{{attribute.definition.name | upfirst}}::TypeInfo::DecodableType &); - {%- else -%} - chip::app::Clusters::{{cluster.name}}::Attributes::{{attribute.definition.name | upfirst}}::TypeInfo::DecodableArgType); - {%- endif -%} - {%- endfor -%} -{% endfor %} - diff --git a/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja b/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja deleted file mode 100644 index 3042568424a86e..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -{% for type in globalTypes -%} -{%- set typeLookup = idl | createLookupContext(None) -%} -{%- set encodable = type.idl_type | globalAsEncodable(typeLookup) -%} -CHIP{{type.name}}AttributeCallback::CHIP{{type.name}}AttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback<{{type.name}}AttributeCallback>(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIP{{type.name}}AttributeCallback::~CHIP{{type.name}}AttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIP{{type.name}}AttributeCallback::CallbackFn(void * context, {{type.cpp_type}} value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - {%- if encodable.is_octet_string %} - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - - VerifyOrReturn(chip::CanCastTo(value.size()), ChipLogError(Zcl, "Value too long")); - jbyteArray valueArr = env->NewByteArray(static_cast(value.size())); - env->ExceptionClear(); - env->SetByteArrayRegion(valueArr, 0, static_cast(value.size()), reinterpret_cast(value.data())); - - env->CallVoidMethod(javaCallbackRef, javaMethod, valueArr); - {%- elif encodable.is_char_string %} - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - - chip::UtfString valueStr(env, value); - env->CallVoidMethod(javaCallbackRef, javaMethod, valueStr.jniValue()); - {%- else %} - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{encodable.unboxed_java_signature}})V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast<{{encodable.jni_fundamental_type}}>(value)); - {%- endif %} -} - -{% endfor %} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja b/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja deleted file mode 100644 index 439656e5376aec..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -{% for type in globalTypes -%} -class CHIP{{type.name}}AttributeCallback : public chip::Callback::Callback<{{type.name}}AttributeCallback> -{ -public: - CHIP{{type.name}}AttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIP{{type.name}}AttributeCallback(); - - static void maybeDestroy(CHIP{{type.name}}AttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, {{type.cpp_type}} value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -{% endfor %} - -{% for cluster in clientClusters | sort(attribute='code') %} - {% set typeLookup = idl | createLookupContext(cluster) %} - {%- for attr in cluster.attributes | rejectattr('definition', 'is_using_global_callback', typeLookup) %} -class CHIP{{cluster.name}}{{attr.definition.name | capitalcase}}AttributeCallback : public chip::Callback::Callback -{ -public: - CHIP{{cluster.name}}{{attr.definition.name | capitalcase}}AttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIP{{cluster.name}}{{attr.definition.name | capitalcase}}AttributeCallback(); - - static void maybeDestroy(CHIP{{cluster.name}}{{attr.definition.name | capitalcase}}AttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, {{attr.definition | decodableJniType(typeLookup)}} {%if attr.definition.is_list%}list{%else%}value{%endif%}); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - {% endfor %} -{% endfor %} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja deleted file mode 100644 index 22812797373cdf..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja +++ /dev/null @@ -1,216 +0,0 @@ -{%- macro encode_optional(target, source, depth, encodable) -%} - { - jobject optionalValue_{{depth}} = nullptr; - chip::JniReferences::GetInstance().GetOptionalValue({{source}}, optionalValue_{{depth}}); - if (optionalValue_{{depth}}) { - auto & definedValue_{{depth}} = {{target}}.Emplace(); - {{ encode_value( - "definedValue_{}".format(depth), - "optionalValue_{}".format(depth), - depth+1, - encodable.without_optional() - )}} - } - } -{%- endmacro %} - -{%- macro encode_nullable(target, source, depth, encodable) -%} - if ({{source}} == nullptr) { - {{target}}.SetNull(); - } else { - auto & nonNullValue_{{depth}} = {{target}}.SetNonNull(); - {{encode_value("nonNullValue_{}".format(depth), source, depth+1, encodable.without_nullable())}} - } -{%- endmacro %} - -{%- macro encode_list(target, source, depth, encodable) -%} - { - using ListType_{{depth}} = std::remove_reference_t; - using ListMemberType_{{depth}} = ListMemberTypeGetter::Type; - jint {{source}}Size; - chip::JniReferences::GetInstance().GetListSize({{source}}, {{source}}Size); - if ({{source}}Size != 0) { - auto * listHolder_{{depth}} = new ListHolder({{source}}Size); - listFreer.add(listHolder_{{depth}}); - - for (jint i_{{depth}} = 0; i_{{depth}} < {{source}}Size; ++i_{{depth}}) { - jobject element_{{depth}}; - chip::JniReferences::GetInstance().GetListItem({{source}}, i_{{depth}}, element_{{depth}}); - {{encode_value( - "listHolder_{}->mList[static_cast(i_{})]".format(depth, depth), - "element_{}".format(depth), - depth+1, encodable.without_list() - )}} - } - {{target}} = ListType_{{depth}}(listHolder_{{depth}}->mList, {{source}}Size); - } else { - {{target}} = ListType_{{depth}}(); - } - } -{%- endmacro %} - -{%- macro encode_value(target, source, depth, encodable) -%} - {%- if encodable.is_optional -%} - {{encode_optional(target, source, depth, encodable)}} - {%- elif encodable.is_nullable -%} - {{encode_nullable(target, source, depth, encodable)}} - {%- elif encodable.is_list -%} - {{encode_list(target, source, depth, encodable)}} - {%- elif encodable.is_octet_string -%} - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast({{source}}))); - {{target}} = cleanupByteArrays.back()->byteSpan(); - {%- elif encodable.is_char_string -%} - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast({{source}}))); - {{target}} = cleanupStrings.back()->charSpan(); - {%- elif encodable.is_struct -%} - {% set struct = encodable.get_underlying_struct() -%} - {% for field in struct.fields %} - {% set fieldEncodable = field | asEncodable(encodable.context) -%} - jobject {{source}}_{{field.name}}Item_{{depth}}; - chip::JniReferences::GetInstance().GetObjectField({{source}}, "{{field.name}}", "{{fieldEncodable.boxed_java_signature}}", {{source}}_{{field.name}}Item_{{depth}}); - {{ encode_value( - "{}.{}".format(target, field.name | lowercaseFirst), - "{}_{}Item_{}".format(source, field.name, depth), - depth + 1, - fieldEncodable - )}} - {%- endfor -%} - {%- elif encodable.is_enum -%} - {{target}} = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive({{source}})); - {%- elif encodable.is_untyped_bitmap -%} - {{target}} = static_cast>(chip::JniReferences::GetInstance().{{encodable.boxed_java_type}}ToPrimitive({{source}})); - {%- elif encodable.is_bitmap -%} - {{target}}.SetRaw(static_cast::IntegerType>(chip::JniReferences::GetInstance().{{encodable.boxed_java_type}}ToPrimitive({{source}}))); - {% else -%} - {{target}} = static_cast>(chip::JniReferences::GetInstance().{{encodable.boxed_java_type}}ToPrimitive({{source}})); - {% endif -%} -{% endmacro -%} - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, {{cluster.name | capitalcase}}Cluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -{% for command in cluster.commands -%} - -JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, - {{command.name | lowercaseFirst}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, - {%- if command.input_param -%} - {%- for field in (cluster.structs | named(command.input_param)).fields -%} - {{ field | toBoxedJavaType }} {{field.name}}, - {%- endfor -%} - {%- endif -%} - jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster; - - ListFreer listFreer; - chip::app::Clusters::{{cluster.name | capitalcase}}::Commands::{{command.name | capitalcase}}::Type request; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - {%- if command.input_param -%} - {%- for field in (cluster.structs | named(command.input_param)).fields -%} - {{ encode_value( - "request." + (field.name | lowercaseFirst), - (field.name | lowercaseFirst), - 0, - field | asEncodable(typeLookup) - )}} - {%- endfor -%} - {% endif %} - - {% set callbackName = command | commandCallbackName(cluster) %} - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - - cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - {% if command.is_timed_invoke -%} - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); - {%- else -%} - if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } else { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); - } - {%- endif %} - VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - - onSuccess.release(); - onFailure.release(); -} -{% endfor %} - -{%- for attr in cluster.attributes if attr.is_subscribable -%} -{%- if attr | canGenerateSubscribe(typeLookup) -%} - -JNI_METHOD(void, {{cluster.name}}Cluster, subscribe{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - - {%- set callbackName = attr | callbackName(typeLookup) -%} - - std::unique_ptr<{{callbackName}}, void (*)({{callbackName}} *)> onSuccess(Platform::New<{{callbackName}}>(callback, true), chip::Platform::Delete<{{callbackName}}>); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::{{cluster.name}}::Attributes::{{attr.definition.name | capitalcase}}::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), {{callbackName}}::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -{%- endif -%} -{% endfor %} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja deleted file mode 100644 index f5e4c228419ebd..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja +++ /dev/null @@ -1,54 +0,0 @@ -{# Copyright (c) 2022 Project CHIP Authors - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - #} -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -{%- for attr in cluster.attributes | attributesWithCallback(typeLookup) %} -JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{% if attr | isFabricScopedList(typeLookup) %}, jboolean isFabricFiltered{% endif %}) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::{{cluster.name | capitalcase}}::Attributes::{{attr.definition.name | capitalcase}}::TypeInfo; - {%- set callbackName = attr | callbackName(typeLookup) %} - std::unique_ptr<{{callbackName}}, void (*)({{callbackName}} *)> onSuccess(chip::Platform::New<{{callbackName}}>(callback, false), chip::Platform::Delete<{{callbackName}}>); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall{% if attr | isFabricScopedList(typeLookup) %}, isFabricFiltered{% endif %}); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -{% endfor %} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index caceed7866e9d4..da7eef254f9fa7 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -762,57 +762,6 @@ def internal_render_all(self): Renders .CPP files required for JNI support. """ - large_targets = [ - GenerateTarget(template="CHIPCallbackTypes.jinja", - output_name="jni/CHIPCallbackTypes.h"), - GenerateTarget(template="CHIPReadCallbacks_h.jinja", - output_name="jni/CHIPReadCallbacks.h"), - GenerateTarget(template="CHIPGlobalCallbacks_cpp.jinja", - output_name="jni/CHIPGlobalCallbacks.cpp"), - ] - - for target in large_targets: - self.internal_render_one_output( - template_path=target.template, - output_file_name=target.output_name, - vars={ - 'idl': self.idl, - 'clientClusters': self.idl.clusters, - 'globalTypes': _GLOBAL_TYPES, - } - ) - - cluster_targets = [ - GenerateTarget(template="ChipClustersRead.jinja", - output_name="jni/{cluster_name}Client-ReadImpl.cpp"), - GenerateTarget(template="ChipClustersCpp.jinja", - output_name="jni/{cluster_name}Client-InvokeSubscribeImpl.cpp"), - ] - - self.internal_render_one_output( - template_path="CHIPCallbackTypes.jinja", - output_file_name="jni/CHIPCallbackTypes.h", - vars={ - 'idl': self.idl, - 'clientClusters': self.idl.clusters, - } - ) - - # Every cluster has its own impl, to avoid - # very large compilations (running out of RAM) - for cluster in self.idl.clusters: - for target in cluster_targets: - self.internal_render_one_output( - template_path=target.template, - output_file_name=target.output_name.format( - cluster_name=cluster.name), - vars={ - 'cluster': cluster, - 'typeLookup': TypeLookupContext(self.idl, cluster), - 'globalTypes': _GLOBAL_TYPES, - } - ) - class JavaClassGenerator(__JavaCodeGenerator): """Generates .java files """ diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index a9ae014c454cbf..8f8b0e5947fb9e 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -10,46 +10,6 @@ # - input_file is the input IDL # - output_file/golden_path are the expected output file names # and the expected content for those output files. -java-jni: - inputs/simple_attribute.matter: - jni/MyClusterClient-ReadImpl.cpp: outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp - jni/MyClusterClient-InvokeSubscribeImpl.cpp: outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp - jni/CHIPCallbackTypes.h: outputs/simple_attribute/jni/CHIPCallbackTypes.h - jni/CHIPReadCallbacks.h: outputs/simple_attribute/jni/CHIPReadReadCallbacks.h - jni/CHIPGlobalCallbacks.cpp: outputs/shared/jni/CHIPGlobalCallbacks.cpp - - inputs/global_struct_attribute.matter: - jni/DemoClusterClient-ReadImpl.cpp: outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp - jni/DemoClusterClient-InvokeSubscribeImpl.cpp: outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp - jni/CHIPCallbackTypes.h: outputs/global_struct_attribute/jni/CHIPCallbackTypes.h - jni/CHIPReadCallbacks.h: outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h - jni/CHIPGlobalCallbacks.cpp: outputs/shared/jni/CHIPGlobalCallbacks.cpp - - inputs/cluster_struct_attribute.matter: - jni/DemoClusterClient-ReadImpl.cpp: outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp - jni/DemoClusterClient-InvokeSubscribeImpl.cpp: outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp - jni/CHIPCallbackTypes.h: outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h - jni/CHIPReadCallbacks.h: outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h - jni/CHIPGlobalCallbacks.cpp: outputs/shared/jni/CHIPGlobalCallbacks.cpp - - inputs/several_clusters.matter: - jni/FirstClient-ReadImpl.cpp: outputs/several_clusters/jni/FirstClient-ReadImpl.cpp - jni/SecondClient-ReadImpl.cpp: outputs/several_clusters/jni/SecondClient-ReadImpl.cpp - jni/ThirdClient-ReadImpl.cpp: outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp - jni/FirstClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp - jni/SecondClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp - jni/ThirdClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp - jni/CHIPCallbackTypes.h: outputs/several_clusters/jni/CHIPCallbackTypes.h - jni/CHIPReadCallbacks.h: outputs/several_clusters/jni/CHIPReadReadCallbacks.h - jni/CHIPGlobalCallbacks.cpp: outputs/shared/jni/CHIPGlobalCallbacks.cpp - - inputs/optional_argument.matter: - jni/MyClusterClient-ReadImpl.cpp: outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp - jni/MyClusterClient-InvokeSubscribeImpl.cpp: outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp - jni/CHIPCallbackTypes.h: outputs/optional_argument/jni/CHIPCallbackTypes.h - jni/CHIPReadCallbacks.h: outputs/optional_argument/jni/CHIPReadReadCallbacks.h - jni/CHIPGlobalCallbacks.cpp: outputs/shared/jni/CHIPGlobalCallbacks.cpp - java-class: inputs/several_clusters.matter: java/chip/devicecontroller/cluster/structs/SecondClusterFabricDescriptorStruct.kt: outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h deleted file mode 100644 index fcb6fe68e06488..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - - -typedef void (*CHIPDemoClusterClusterSingleFailSafeAttributeCallbackType)(void *, chip::app::Clusters::DemoCluster::Attributes::SingleFailSafe::TypeInfo::DecodableArgType); -typedef void (*CHIPDemoClusterClusterArmFailsafesAttributeCallbackType)(void *, const chip::app::Clusters::DemoCluster::Attributes::ArmFailsafes::TypeInfo::DecodableType &); - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h deleted file mode 100644 index d09b32303c11fe..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h +++ /dev/null @@ -1,393 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -class CHIPBooleanAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBooleanAttributeCallback(); - - static void maybeDestroy(CHIPBooleanAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, bool value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPCharStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPCharStringAttributeCallback(); - - static void maybeDestroy(CHIPCharStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::CharSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPDoubleAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDoubleAttributeCallback(); - - static void maybeDestroy(CHIPDoubleAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, double value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPFloatAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPFloatAttributeCallback(); - - static void maybeDestroy(CHIPFloatAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, float value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8sAttributeCallback(); - - static void maybeDestroy(CHIPInt8sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8uAttributeCallback(); - - static void maybeDestroy(CHIPInt8uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16sAttributeCallback(); - - static void maybeDestroy(CHIPInt16sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16uAttributeCallback(); - - static void maybeDestroy(CHIPInt16uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32sAttributeCallback(); - - static void maybeDestroy(CHIPInt32sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32uAttributeCallback(); - - static void maybeDestroy(CHIPInt32uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64sAttributeCallback(); - - static void maybeDestroy(CHIPInt64sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64uAttributeCallback(); - - static void maybeDestroy(CHIPInt64uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPOctetStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOctetStringAttributeCallback(); - - static void maybeDestroy(CHIPOctetStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::ByteSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - -class CHIPDemoClusterSingleFailSafeAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDemoClusterSingleFailSafeAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDemoClusterSingleFailSafeAttributeCallback(); - - static void maybeDestroy(CHIPDemoClusterSingleFailSafeAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::app::Clusters::DemoCluster::Structs::ArmFailSafeRequest::DecodableType value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - -class CHIPDemoClusterArmFailsafesAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDemoClusterArmFailsafesAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDemoClusterArmFailsafesAttributeCallback(); - - static void maybeDestroy(CHIPDemoClusterArmFailsafesAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index fc3ff0a8d4c134..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, DemoClusterCluster, subscribeArmFailsafesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::ArmFailsafes::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPDemoClusterArmFailsafesAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp deleted file mode 100644 index 400f3dee271a2a..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, DemoClusterCluster, readArmFailsafesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::ArmFailsafes::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h deleted file mode 100644 index 6abf7f8bc6b9cc..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - - -typedef void (*CHIPDemoClusterClusterSingleLabelAttributeCallbackType)(void *, chip::app::Clusters::DemoCluster::Attributes::SingleLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPDemoClusterClusterSomeLabelsAttributeCallbackType)(void *, const chip::app::Clusters::DemoCluster::Attributes::SomeLabels::TypeInfo::DecodableType &); - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h deleted file mode 100644 index 2a41d23939af0e..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h +++ /dev/null @@ -1,393 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -class CHIPBooleanAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBooleanAttributeCallback(); - - static void maybeDestroy(CHIPBooleanAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, bool value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPCharStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPCharStringAttributeCallback(); - - static void maybeDestroy(CHIPCharStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::CharSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPDoubleAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDoubleAttributeCallback(); - - static void maybeDestroy(CHIPDoubleAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, double value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPFloatAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPFloatAttributeCallback(); - - static void maybeDestroy(CHIPFloatAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, float value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8sAttributeCallback(); - - static void maybeDestroy(CHIPInt8sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8uAttributeCallback(); - - static void maybeDestroy(CHIPInt8uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16sAttributeCallback(); - - static void maybeDestroy(CHIPInt16sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16uAttributeCallback(); - - static void maybeDestroy(CHIPInt16uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32sAttributeCallback(); - - static void maybeDestroy(CHIPInt32sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32uAttributeCallback(); - - static void maybeDestroy(CHIPInt32uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64sAttributeCallback(); - - static void maybeDestroy(CHIPInt64sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64uAttributeCallback(); - - static void maybeDestroy(CHIPInt64uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPOctetStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOctetStringAttributeCallback(); - - static void maybeDestroy(CHIPOctetStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::ByteSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - -class CHIPDemoClusterSingleLabelAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDemoClusterSingleLabelAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDemoClusterSingleLabelAttributeCallback(); - - static void maybeDestroy(CHIPDemoClusterSingleLabelAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::app::Clusters::DemoCluster::Structs::LabelStruct::DecodableType value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - -class CHIPDemoClusterSomeLabelsAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDemoClusterSomeLabelsAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDemoClusterSomeLabelsAttributeCallback(); - - static void maybeDestroy(CHIPDemoClusterSomeLabelsAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index 0ed4b562e6b16d..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, DemoClusterCluster, subscribeSomeLabelsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::SomeLabels::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPDemoClusterSomeLabelsAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp deleted file mode 100644 index 243f4a46273139..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, DemoClusterCluster, readSomeLabelsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::SomeLabels::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h deleted file mode 100644 index 3310f9d64f5321..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h deleted file mode 100644 index 81b4d9046949d8..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -class CHIPBooleanAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBooleanAttributeCallback(); - - static void maybeDestroy(CHIPBooleanAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, bool value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPCharStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPCharStringAttributeCallback(); - - static void maybeDestroy(CHIPCharStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::CharSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPDoubleAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDoubleAttributeCallback(); - - static void maybeDestroy(CHIPDoubleAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, double value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPFloatAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPFloatAttributeCallback(); - - static void maybeDestroy(CHIPFloatAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, float value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8sAttributeCallback(); - - static void maybeDestroy(CHIPInt8sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8uAttributeCallback(); - - static void maybeDestroy(CHIPInt8uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16sAttributeCallback(); - - static void maybeDestroy(CHIPInt16sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16uAttributeCallback(); - - static void maybeDestroy(CHIPInt16uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32sAttributeCallback(); - - static void maybeDestroy(CHIPInt32sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32uAttributeCallback(); - - static void maybeDestroy(CHIPInt32uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64sAttributeCallback(); - - static void maybeDestroy(CHIPInt64sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64uAttributeCallback(); - - static void maybeDestroy(CHIPInt64uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPOctetStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOctetStringAttributeCallback(); - - static void maybeDestroy(CHIPOctetStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::ByteSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index b599b46b723e5b..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, MyClusterCluster, - foo)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback,jobject argument,jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster; - - ListFreer listFreer; - chip::app::Clusters::MyCluster::Commands::Foo::Type request; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings;{ - jobject optionalValue_0 = nullptr; - chip::JniReferences::GetInstance().GetOptionalValue(argument, optionalValue_0); - if (optionalValue_0) { - auto & definedValue_0 = request.argument.Emplace(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); - definedValue_0 = cleanupByteArrays.back()->byteSpan(); - } - } - - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - - cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } else { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); - } - VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - - onSuccess.release(); - onFailure.release(); -} - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp deleted file mode 100644 index 30a766dd4563aa..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp +++ /dev/null @@ -1,14 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h deleted file mode 100644 index d32e68fbfda3ab..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - - -typedef void (*CHIPFirstClusterSomeIntegerAttributeCallbackType)(void *, chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo::DecodableArgType); -typedef void (*CHIPSecondClusterFabricsAttributeCallbackType)(void *, const chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo::DecodableType &); -typedef void (*CHIPSecondClusterSomeBytesAttributeCallbackType)(void *, chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo::DecodableArgType); -typedef void (*CHIPThirdClusterSomeEnumAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo::DecodableArgType); -typedef void (*CHIPThirdClusterOptionsAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::Options::TypeInfo::DecodableArgType); - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h deleted file mode 100644 index 35eb4e3e3115ec..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h +++ /dev/null @@ -1,423 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -class CHIPBooleanAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBooleanAttributeCallback(); - - static void maybeDestroy(CHIPBooleanAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, bool value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPCharStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPCharStringAttributeCallback(); - - static void maybeDestroy(CHIPCharStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::CharSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPDoubleAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDoubleAttributeCallback(); - - static void maybeDestroy(CHIPDoubleAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, double value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPFloatAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPFloatAttributeCallback(); - - static void maybeDestroy(CHIPFloatAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, float value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8sAttributeCallback(); - - static void maybeDestroy(CHIPInt8sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8uAttributeCallback(); - - static void maybeDestroy(CHIPInt8uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16sAttributeCallback(); - - static void maybeDestroy(CHIPInt16sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16uAttributeCallback(); - - static void maybeDestroy(CHIPInt16uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32sAttributeCallback(); - - static void maybeDestroy(CHIPInt32sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32uAttributeCallback(); - - static void maybeDestroy(CHIPInt32uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64sAttributeCallback(); - - static void maybeDestroy(CHIPInt64sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64uAttributeCallback(); - - static void maybeDestroy(CHIPInt64uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPOctetStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOctetStringAttributeCallback(); - - static void maybeDestroy(CHIPOctetStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::ByteSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - - - -class CHIPSecondFabricsAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPSecondFabricsAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPSecondFabricsAttributeCallback(); - - static void maybeDestroy(CHIPSecondFabricsAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - -class CHIPThirdSomeEnumAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPThirdSomeEnumAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPThirdSomeEnumAttributeCallback(); - - static void maybeDestroy(CHIPThirdSomeEnumAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::app::Clusters::Third::MyEnum value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - -class CHIPThirdOptionsAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPThirdOptionsAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPThirdOptionsAttributeCallback(); - - static void maybeDestroy(CHIPThirdOptionsAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::BitMask value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index 8a613d404b23ae..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, FirstCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, FirstCluster, subscribeSomeIntegerAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp deleted file mode 100644 index 0d09a2adced29f..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, FirstCluster, readSomeIntegerAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index f123a5407e0170..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, SecondCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, SecondCluster, subscribeFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPSecondFabricsAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -}JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp deleted file mode 100644 index 714790e2c9d28e..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp +++ /dev/null @@ -1,62 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, SecondCluster, readFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jboolean isFabricFiltered) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, isFabricFiltered); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - -JNI_METHOD(void, SecondCluster, readSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index c2fb763a0eefb4..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, ThirdCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, ThirdCluster, subscribeSomeEnumAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt8uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -}JNI_METHOD(void, ThirdCluster, subscribeOptionsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::Third::Attributes::Options::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt8uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp deleted file mode 100644 index 5799f7a6f4a3e0..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-ReadImpl.cpp +++ /dev/null @@ -1,62 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, ThirdCluster, readSomeEnumAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - -JNI_METHOD(void, ThirdCluster, readOptionsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Third::Attributes::Options::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/shared/jni/CHIPGlobalCallbacks.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/shared/jni/CHIPGlobalCallbacks.cpp deleted file mode 100644 index e89045213a74c8..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/shared/jni/CHIPGlobalCallbacks.cpp +++ /dev/null @@ -1,603 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -CHIPBooleanAttributeCallback::CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanAttributeCallback::~CHIPBooleanAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanAttributeCallback::CallbackFn(void * context, bool value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Z)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPCharStringAttributeCallback::CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCharStringAttributeCallback::~CHIPCharStringAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCharStringAttributeCallback::CallbackFn(void * context, const chip::CharSpan value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - - chip::UtfString valueStr(env, value); - env->CallVoidMethod(javaCallbackRef, javaMethod, valueStr.jniValue()); -} - -CHIPDoubleAttributeCallback::CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoubleAttributeCallback::~CHIPDoubleAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoubleAttributeCallback::CallbackFn(void * context, double value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(D)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPFloatAttributeCallback::CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFloatAttributeCallback::~CHIPFloatAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFloatAttributeCallback::CallbackFn(void * context, float value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(F)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt8sAttributeCallback::CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt8sAttributeCallback::~CHIPInt8sAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt8sAttributeCallback::CallbackFn(void * context, int8_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(I)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt8uAttributeCallback::CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt8uAttributeCallback::~CHIPInt8uAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt8uAttributeCallback::CallbackFn(void * context, uint8_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(I)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt16sAttributeCallback::CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt16sAttributeCallback::~CHIPInt16sAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt16sAttributeCallback::CallbackFn(void * context, int16_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(I)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt16uAttributeCallback::CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt16uAttributeCallback::~CHIPInt16uAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt16uAttributeCallback::CallbackFn(void * context, uint16_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(I)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt32sAttributeCallback::CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt32sAttributeCallback::~CHIPInt32sAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt32sAttributeCallback::CallbackFn(void * context, int32_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(J)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt32uAttributeCallback::CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt32uAttributeCallback::~CHIPInt32uAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt32uAttributeCallback::CallbackFn(void * context, uint32_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(J)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt64sAttributeCallback::CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt64sAttributeCallback::~CHIPInt64sAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt64sAttributeCallback::CallbackFn(void * context, int64_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(J)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPInt64uAttributeCallback::CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPInt64uAttributeCallback::~CHIPInt64uAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPInt64uAttributeCallback::CallbackFn(void * context, uint64_t value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(J)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - env->CallVoidMethod(javaCallbackRef, javaMethod, static_cast(value)); -} - -CHIPOctetStringAttributeCallback::CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOctetStringAttributeCallback::~CHIPOctetStringAttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOctetStringAttributeCallback::CallbackFn(void * context, const chip::ByteSpan value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a - // null callback. - jobject javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogDetail(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess method")); - - VerifyOrReturn(chip::CanCastTo(value.size()), ChipLogError(Zcl, "Value too long")); - jbyteArray valueArr = env->NewByteArray(static_cast(value.size())); - env->ExceptionClear(); - env->SetByteArrayRegion(valueArr, 0, static_cast(value.size()), reinterpret_cast(value.data())); - - env->CallVoidMethod(javaCallbackRef, javaMethod, valueArr); -} - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h deleted file mode 100644 index 975e27045e0aba..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - - -typedef void (*CHIPMyClusterClusterClusterAttrAttributeCallbackType)(void *, chip::app::Clusters::MyCluster::Attributes::ClusterAttr::TypeInfo::DecodableArgType); - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h deleted file mode 100644 index 81b4d9046949d8..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include -#include -#include -#include -#include - -class CHIPBooleanAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBooleanAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBooleanAttributeCallback(); - - static void maybeDestroy(CHIPBooleanAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, bool value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPCharStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPCharStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPCharStringAttributeCallback(); - - static void maybeDestroy(CHIPCharStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::CharSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPDoubleAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPDoubleAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPDoubleAttributeCallback(); - - static void maybeDestroy(CHIPDoubleAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, double value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPFloatAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPFloatAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPFloatAttributeCallback(); - - static void maybeDestroy(CHIPFloatAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, float value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8sAttributeCallback(); - - static void maybeDestroy(CHIPInt8sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt8uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt8uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt8uAttributeCallback(); - - static void maybeDestroy(CHIPInt8uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint8_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16sAttributeCallback(); - - static void maybeDestroy(CHIPInt16sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt16uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt16uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt16uAttributeCallback(); - - static void maybeDestroy(CHIPInt16uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint16_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32sAttributeCallback(); - - static void maybeDestroy(CHIPInt32sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt32uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt32uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt32uAttributeCallback(); - - static void maybeDestroy(CHIPInt32uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint32_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64sAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64sAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64sAttributeCallback(); - - static void maybeDestroy(CHIPInt64sAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, int64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPInt64uAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPInt64uAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPInt64uAttributeCallback(); - - static void maybeDestroy(CHIPInt64uAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, uint64_t value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; -class CHIPOctetStringAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPOctetStringAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOctetStringAttributeCallback(); - - static void maybeDestroy(CHIPOctetStringAttributeCallback * callback) { - if (!callback->keepAlive) { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::ByteSpan value); - static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - - - - - diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp deleted file mode 100644 index 128a6f8329ecad..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using chip::Controller::ClusterBase; - -JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); - ClusterBase * cppCluster = new ClusterBase(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, MyClusterCluster, subscribeClusterAttrAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::MyCluster::Attributes::ClusterAttr::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp deleted file mode 100644 index 504996a2928a51..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME -JNI_METHOD(void, MyClusterCluster, readClusterAttrAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::MyCluster::Attributes::ClusterAttr::TypeInfo; - std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - - diff --git a/scripts/py_matter_idl/setup.cfg b/scripts/py_matter_idl/setup.cfg index 912993199b6351..3eb3510aeda209 100644 --- a/scripts/py_matter_idl/setup.cfg +++ b/scripts/py_matter_idl/setup.cfg @@ -36,10 +36,6 @@ matter_idl = generators/cpp/tlvmeta/TLVMetaData_cpp.jinja generators/cpp/tlvmeta/TLVMetaData_h.jinja generators/idl/MatterIdl.jinja - generators/java/CHIPCallbackTypes.jinja - generators/java/ChipClustersCpp.jinja - generators/java/ChipClustersRead.jinja - generators/java/CHIPReadCallbacks_h.jinja generators/java/ClusterIDMapping.jinja generators/java/ClusterReadMapping.jinja generators/java/ClusterWriteMapping.jinja diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 8b55ecd991bb31..3b66d026699908 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -48,271 +48,3 @@ chip_data_model("data_model") { allow_circular_includes_from = [ "${chip_root}/src/controller" ] } - -if (current_os == "android" || matter_enable_java_compilation) { - config("java-build-config") { - if (matter_enable_java_compilation) { - include_dirs = java_matter_controller_dependent_paths - } - } - - chip_codegen("java-jni-generate") { - input = "controller-clusters.matter" - generator = "java-jni" - - outputs = [ - "jni/AccessControlClient-InvokeSubscribeImpl.cpp", - "jni/AccessControlClient-ReadImpl.cpp", - "jni/AccountLoginClient-InvokeSubscribeImpl.cpp", - "jni/AccountLoginClient-ReadImpl.cpp", - "jni/ActionsClient-InvokeSubscribeImpl.cpp", - "jni/ActionsClient-ReadImpl.cpp", - "jni/ActivatedCarbonFilterMonitoringClient-InvokeSubscribeImpl.cpp", - "jni/ActivatedCarbonFilterMonitoringClient-ReadImpl.cpp", - "jni/AdministratorCommissioningClient-InvokeSubscribeImpl.cpp", - "jni/AdministratorCommissioningClient-ReadImpl.cpp", - "jni/AirQualityClient-InvokeSubscribeImpl.cpp", - "jni/AirQualityClient-ReadImpl.cpp", - "jni/ApplicationBasicClient-InvokeSubscribeImpl.cpp", - "jni/ApplicationBasicClient-ReadImpl.cpp", - "jni/ApplicationLauncherClient-InvokeSubscribeImpl.cpp", - "jni/ApplicationLauncherClient-ReadImpl.cpp", - "jni/AudioOutputClient-InvokeSubscribeImpl.cpp", - "jni/AudioOutputClient-ReadImpl.cpp", - "jni/BallastConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/BallastConfigurationClient-ReadImpl.cpp", - "jni/BarrierControlClient-InvokeSubscribeImpl.cpp", - "jni/BarrierControlClient-ReadImpl.cpp", - "jni/BasicInformationClient-InvokeSubscribeImpl.cpp", - "jni/BasicInformationClient-ReadImpl.cpp", - "jni/BinaryInputBasicClient-InvokeSubscribeImpl.cpp", - "jni/BinaryInputBasicClient-ReadImpl.cpp", - "jni/BindingClient-InvokeSubscribeImpl.cpp", - "jni/BindingClient-ReadImpl.cpp", - "jni/BooleanStateClient-InvokeSubscribeImpl.cpp", - "jni/BooleanStateClient-ReadImpl.cpp", - "jni/BridgedDeviceBasicInformationClient-InvokeSubscribeImpl.cpp", - "jni/BridgedDeviceBasicInformationClient-ReadImpl.cpp", - "jni/CarbonDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/CarbonDioxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/CarbonMonoxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/CarbonMonoxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ChannelClient-InvokeSubscribeImpl.cpp", - "jni/ChannelClient-ReadImpl.cpp", - "jni/CHIPCallbackTypes.h", - "jni/CHIPGlobalCallbacks.cpp", - "jni/CHIPReadCallbacks.h", - "jni/ColorControlClient-InvokeSubscribeImpl.cpp", - "jni/ColorControlClient-ReadImpl.cpp", - "jni/ContentLauncherClient-InvokeSubscribeImpl.cpp", - "jni/ContentLauncherClient-ReadImpl.cpp", - "jni/DescriptorClient-InvokeSubscribeImpl.cpp", - "jni/DescriptorClient-ReadImpl.cpp", - "jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp", - "jni/DiagnosticLogsClient-ReadImpl.cpp", - "jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp", - "jni/DishwasherAlarmClient-ReadImpl.cpp", - "jni/DishwasherModeClient-InvokeSubscribeImpl.cpp", - "jni/DishwasherModeClient-ReadImpl.cpp", - "jni/MicrowaveOvenModeClient-InvokeSubscribeImpl.cpp", - "jni/MicrowaveOvenModeClient-ReadImpl.cpp", - "jni/MicrowaveOvenControlClient-InvokeSubscribeImpl.cpp", - "jni/MicrowaveOvenControlClient-ReadImpl.cpp", - "jni/DoorLockClient-InvokeSubscribeImpl.cpp", - "jni/DoorLockClient-ReadImpl.cpp", - "jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ElectricalMeasurementClient-ReadImpl.cpp", - "jni/DeviceEnergyManagementClient-InvokeSubscribeImpl.cpp", - "jni/DeviceEnergyManagementClient-ReadImpl.cpp", - "jni/DeviceEnergyManagementModeClient-InvokeSubscribeImpl.cpp", - "jni/DeviceEnergyManagementModeClient-ReadImpl.cpp", - "jni/EthernetNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", - "jni/EthernetNetworkDiagnosticsClient-ReadImpl.cpp", - "jni/EnergyEvseClient-InvokeSubscribeImpl.cpp", - "jni/EnergyEvseClient-ReadImpl.cpp", - "jni/EnergyEvseModeClient-InvokeSubscribeImpl.cpp", - "jni/EnergyEvseModeClient-ReadImpl.cpp", - "jni/FanControlClient-InvokeSubscribeImpl.cpp", - "jni/FanControlClient-ReadImpl.cpp", - "jni/FaultInjectionClient-InvokeSubscribeImpl.cpp", - "jni/FaultInjectionClient-ReadImpl.cpp", - "jni/FixedLabelClient-InvokeSubscribeImpl.cpp", - "jni/FixedLabelClient-ReadImpl.cpp", - "jni/FlowMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/FlowMeasurementClient-ReadImpl.cpp", - "jni/FormaldehydeConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/FormaldehydeConcentrationMeasurementClient-ReadImpl.cpp", - "jni/GeneralCommissioningClient-InvokeSubscribeImpl.cpp", - "jni/GeneralCommissioningClient-ReadImpl.cpp", - "jni/GeneralDiagnosticsClient-InvokeSubscribeImpl.cpp", - "jni/GeneralDiagnosticsClient-ReadImpl.cpp", - "jni/GroupKeyManagementClient-InvokeSubscribeImpl.cpp", - "jni/GroupKeyManagementClient-ReadImpl.cpp", - "jni/GroupsClient-InvokeSubscribeImpl.cpp", - "jni/GroupsClient-ReadImpl.cpp", - "jni/HepaFilterMonitoringClient-InvokeSubscribeImpl.cpp", - "jni/HepaFilterMonitoringClient-ReadImpl.cpp", - "jni/IcdManagementClient-InvokeSubscribeImpl.cpp", - "jni/IcdManagementClient-ReadImpl.cpp", - "jni/IdentifyClient-InvokeSubscribeImpl.cpp", - "jni/IdentifyClient-ReadImpl.cpp", - "jni/IlluminanceMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/IlluminanceMeasurementClient-ReadImpl.cpp", - "jni/KeypadInputClient-InvokeSubscribeImpl.cpp", - "jni/KeypadInputClient-ReadImpl.cpp", - "jni/LaundryWasherModeClient-InvokeSubscribeImpl.cpp", - "jni/LaundryWasherModeClient-ReadImpl.cpp", - "jni/LevelControlClient-InvokeSubscribeImpl.cpp", - "jni/LevelControlClient-ReadImpl.cpp", - "jni/LocalizationConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/LocalizationConfigurationClient-ReadImpl.cpp", - "jni/LowPowerClient-InvokeSubscribeImpl.cpp", - "jni/LowPowerClient-ReadImpl.cpp", - "jni/MediaInputClient-InvokeSubscribeImpl.cpp", - "jni/MediaInputClient-ReadImpl.cpp", - "jni/MediaPlaybackClient-InvokeSubscribeImpl.cpp", - "jni/MediaPlaybackClient-ReadImpl.cpp", - "jni/ModeSelectClient-InvokeSubscribeImpl.cpp", - "jni/ModeSelectClient-ReadImpl.cpp", - "jni/NetworkCommissioningClient-InvokeSubscribeImpl.cpp", - "jni/NetworkCommissioningClient-ReadImpl.cpp", - "jni/NitrogenDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/NitrogenDioxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/OccupancySensingClient-InvokeSubscribeImpl.cpp", - "jni/OccupancySensingClient-ReadImpl.cpp", - "jni/OnOffClient-InvokeSubscribeImpl.cpp", - "jni/OnOffClient-ReadImpl.cpp", - "jni/OnOffSwitchConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/OnOffSwitchConfigurationClient-ReadImpl.cpp", - "jni/OperationalCredentialsClient-InvokeSubscribeImpl.cpp", - "jni/OperationalCredentialsClient-ReadImpl.cpp", - "jni/OperationalStateClient-InvokeSubscribeImpl.cpp", - "jni/OperationalStateClient-ReadImpl.cpp", - "jni/OvenCavityOperationalStateClient-InvokeSubscribeImpl.cpp", - "jni/OvenCavityOperationalStateClient-ReadImpl.cpp", - "jni/OtaSoftwareUpdateProviderClient-InvokeSubscribeImpl.cpp", - "jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp", - "jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp", - "jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp", - "jni/OvenModeClient-InvokeSubscribeImpl.cpp", - "jni/OvenModeClient-ReadImpl.cpp", - "jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/Pm10ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm1ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/Pm1ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm25ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/Pm25ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/PowerSourceClient-InvokeSubscribeImpl.cpp", - "jni/PowerSourceClient-ReadImpl.cpp", - "jni/PowerSourceConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/PowerSourceConfigurationClient-ReadImpl.cpp", - "jni/PressureMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/PressureMeasurementClient-ReadImpl.cpp", - "jni/ProxyConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/ProxyConfigurationClient-ReadImpl.cpp", - "jni/ProxyDiscoveryClient-InvokeSubscribeImpl.cpp", - "jni/ProxyDiscoveryClient-ReadImpl.cpp", - "jni/ProxyValidClient-InvokeSubscribeImpl.cpp", - "jni/ProxyValidClient-ReadImpl.cpp", - "jni/PulseWidthModulationClient-InvokeSubscribeImpl.cpp", - "jni/PulseWidthModulationClient-ReadImpl.cpp", - "jni/PumpConfigurationAndControlClient-InvokeSubscribeImpl.cpp", - "jni/PumpConfigurationAndControlClient-ReadImpl.cpp", - "jni/RadonConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/RadonConcentrationMeasurementClient-ReadImpl.cpp", - "jni/RefrigeratorAlarmClient-InvokeSubscribeImpl.cpp", - "jni/RefrigeratorAlarmClient-ReadImpl.cpp", - "jni/RefrigeratorAndTemperatureControlledCabinetModeClient-InvokeSubscribeImpl.cpp", - "jni/RefrigeratorAndTemperatureControlledCabinetModeClient-ReadImpl.cpp", - "jni/RelativeHumidityMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/RelativeHumidityMeasurementClient-ReadImpl.cpp", - "jni/RvcOperationalStateClient-InvokeSubscribeImpl.cpp", - "jni/RvcOperationalStateClient-ReadImpl.cpp", - "jni/RvcCleanModeClient-InvokeSubscribeImpl.cpp", - "jni/RvcCleanModeClient-ReadImpl.cpp", - "jni/RvcRunModeClient-InvokeSubscribeImpl.cpp", - "jni/RvcRunModeClient-ReadImpl.cpp", - "jni/SampleMeiClient-InvokeSubscribeImpl.cpp", - "jni/SampleMeiClient-ReadImpl.cpp", - "jni/ScenesClient-InvokeSubscribeImpl.cpp", - "jni/ScenesClient-ReadImpl.cpp", - "jni/SmokeCoAlarmClient-InvokeSubscribeImpl.cpp", - "jni/SmokeCoAlarmClient-ReadImpl.cpp", - "jni/SoftwareDiagnosticsClient-InvokeSubscribeImpl.cpp", - "jni/SoftwareDiagnosticsClient-ReadImpl.cpp", - "jni/SwitchClient-InvokeSubscribeImpl.cpp", - "jni/SwitchClient-ReadImpl.cpp", - "jni/TargetNavigatorClient-InvokeSubscribeImpl.cpp", - "jni/TargetNavigatorClient-ReadImpl.cpp", - "jni/TemperatureControlClient-InvokeSubscribeImpl.cpp", - "jni/TemperatureControlClient-ReadImpl.cpp", - "jni/TemperatureMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TemperatureMeasurementClient-ReadImpl.cpp", - "jni/ThermostatClient-InvokeSubscribeImpl.cpp", - "jni/ThermostatClient-ReadImpl.cpp", - "jni/ThermostatUserInterfaceConfigurationClient-InvokeSubscribeImpl.cpp", - "jni/ThermostatUserInterfaceConfigurationClient-ReadImpl.cpp", - "jni/ThreadNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", - "jni/ThreadNetworkDiagnosticsClient-ReadImpl.cpp", - "jni/TimeFormatLocalizationClient-InvokeSubscribeImpl.cpp", - "jni/TimeFormatLocalizationClient-ReadImpl.cpp", - "jni/TimeSynchronizationClient-InvokeSubscribeImpl.cpp", - "jni/TimeSynchronizationClient-ReadImpl.cpp", - "jni/TimerClient-InvokeSubscribeImpl.cpp", - "jni/TimerClient-ReadImpl.cpp", - "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-ReadImpl.cpp", - "jni/UnitLocalizationClient-InvokeSubscribeImpl.cpp", - "jni/UnitLocalizationClient-ReadImpl.cpp", - "jni/UnitTestingClient-InvokeSubscribeImpl.cpp", - "jni/UnitTestingClient-ReadImpl.cpp", - "jni/UserLabelClient-InvokeSubscribeImpl.cpp", - "jni/UserLabelClient-ReadImpl.cpp", - "jni/WakeOnLanClient-InvokeSubscribeImpl.cpp", - "jni/WakeOnLanClient-ReadImpl.cpp", - "jni/LaundryWasherControlsClient-InvokeSubscribeImpl.cpp", - "jni/LaundryWasherControlsClient-ReadImpl.cpp", - "jni/LaundryDryerControlsClient-InvokeSubscribeImpl.cpp", - "jni/LaundryDryerControlsClient-ReadImpl.cpp", - "jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", - "jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp", - "jni/WindowCoveringClient-InvokeSubscribeImpl.cpp", - "jni/WindowCoveringClient-ReadImpl.cpp", - ] - - deps = [ - ":data_model", - "${chip_root}/src/platform:platform_config_header", - ] - - public_configs = [ ":java-build-config" ] - } - - source_set("java-jni-sources") { - public_configs = [ - ":java-build-config", - ":java-jni-generate_config", - "${chip_root}/src:includes", - ] - - deps = [ - ":data_model", - ":java-jni-generate", - "${chip_root}/src/inet", - "${chip_root}/src/lib", - "${chip_root}/src/platform", - ] - - if (matter_enable_java_compilation) { - if (current_os == "mac") { - deps += [ "${chip_root}/src/platform/Darwin" ] - } else { - deps += [ "${chip_root}/src/platform/Linux" ] - } - } else { - deps += [ "${chip_root}/src/platform/android" ] - } - } -} diff --git a/src/controller/java/templates/CHIPClientCallbacks.zapt b/src/controller/java/templates/CHIPClientCallbacks.zapt deleted file mode 100644 index 05a41c866628dd..00000000000000 --- a/src/controller/java/templates/CHIPClientCallbacks.zapt +++ /dev/null @@ -1,21 +0,0 @@ -{{> header}} -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -// List specific responses -{{#zcl_clusters}} -{{#zcl_attributes_server removeKeys='isOptional'}} -{{#if isArray}} -typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); -{{/if}} -{{/zcl_attributes_server}} -{{/zcl_clusters}} - diff --git a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt deleted file mode 100644 index 3bf21de8462028..00000000000000 --- a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt +++ /dev/null @@ -1,81 +0,0 @@ -{{> header}} -#include -#include -#include "CHIPInvokeCallbacks.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wshorten-64-to-32" - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using namespace chip::Controller; - -{{#zcl_clusters}} -{{#zcl_attributes_server removeKeys='isOptional'}} -{{#if_unsupported_attribute_callback type isArray ../id}} -{{else}} -{{#if isWritableAttribute}} - -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - {{>encode_value target="cppValue" source="value" cluster=parent.name depth=0}} - - std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - {{asCamelCased ../name false}}Cluster * cppCluster = reinterpret_cast<{{asCamelCased ../name false}}Cluster *>(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - {{#if mustUseTimedWrite}} - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - {{else}} - if (timedWriteTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - {{/if}} - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -{{/if}} -{{/if_unsupported_attribute_callback}} -{{/zcl_attributes_server}} -{{/zcl_clusters}} - -#pragma clang diagnostic pop diff --git a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt deleted file mode 100644 index b9e5f54409d65d..00000000000000 --- a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt +++ /dev/null @@ -1,74 +0,0 @@ -{{> header}} -#include -#include "CHIPInvokeCallbacks.h" - -#include -#include -#include -#include -#include -#include -#include - -{{! TODO(#8773): Clean up callbacks. }} - -namespace chip { - -{{#zcl_clusters}} - {{#zcl_commands_source_server}} -CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback::CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback(jobject javaCallback): Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback::~CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback::CallbackFn(void * context, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete - ); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#zcl_command_arguments}}{{asJniSignature type null parent.parent.name true}}{{/zcl_command_arguments}})V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - {{#zcl_command_arguments}} - {{>decode_value source=(concat "dataResponse." (asLowerCamelCase name)) target=(asSymbol label) cluster=parent.parent.name depth=0}} - {{/zcl_command_arguments}} - - env->CallVoidMethod(javaCallbackRef, javaMethod{{#zcl_command_arguments}}, {{asSymbol label}}{{/zcl_command_arguments}}); -} - {{/zcl_commands_source_server}} -{{/zcl_clusters}} -} // namespace chip diff --git a/src/controller/java/templates/CHIPInvokeCallbacks.zapt b/src/controller/java/templates/CHIPInvokeCallbacks.zapt deleted file mode 100644 index 34eaf6f2c69328..00000000000000 --- a/src/controller/java/templates/CHIPInvokeCallbacks.zapt +++ /dev/null @@ -1,27 +0,0 @@ -{{> header}} -#include - -#include -#include -#include - -namespace chip { - -{{#zcl_clusters}} - {{#zcl_commands_source_server}} -class CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback : public Callback::Callback -{ -public: - CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback(jobject javaCallback); - - ~CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback(); - - static void CallbackFn(void * context, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase commandName}}::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - - {{/zcl_commands_source_server}} -{{/zcl_clusters}} -} // namespace chip diff --git a/src/controller/java/templates/CHIPReadCallbacks-src.zapt b/src/controller/java/templates/CHIPReadCallbacks-src.zapt deleted file mode 100644 index 4f8624fb44fb77..00000000000000 --- a/src/controller/java/templates/CHIPReadCallbacks-src.zapt +++ /dev/null @@ -1,101 +0,0 @@ -{{> header}} -#include - -#include - -#include -#include -#include -#include -#include -#include - -{{#zcl_clusters}} -{{#zcl_attributes_server removeKeys='isOptional'}} -{{! TODO: Add support for struct-typed attributes }} -{{#if_unsupported_attribute_callback type isArray ../id}} -{{else}} - -{{#if_basic_attribute type ../id}} -{{else}} -CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback::CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback::~CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback() { - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} -{{/if_basic_attribute}} - -{{#if isArray}} -void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback::CallbackFn(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - {{>decode_value source="list" target="arrayListObj" cluster=parent.name depth=0}} - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} -{{else}} - {{#if_basic_attribute type ../id}} - {{else}} - void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback::CallbackFn(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} value) - { - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback(reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#if isArray}}{{else if isStruct}}{{else if isOptional}}Ljava/util/Optional;{{else if (isOctetString type)}}[B{{else if (isCharString type)}}Ljava/lang/String;{{else}}{{asJniSignatureBasic type true}}{{/if}})V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - {{>decode_value source="value" target="javaValue" cluster=parent.name depth=0}} - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); - } - {{/if_basic_attribute}} -{{/if}} -{{/if_unsupported_attribute_callback}} -{{/zcl_attributes_server}} -{{/zcl_clusters}} diff --git a/src/controller/java/templates/templates.json b/src/controller/java/templates/templates.json index 4113382219ec63..5ff5eb7ef0dad5 100644 --- a/src/controller/java/templates/templates.json +++ b/src/controller/java/templates/templates.json @@ -34,31 +34,6 @@ } ], "templates": [ - { - "path": "CHIPInvokeCallbacks.zapt", - "name": "CHIP cluster invoke callbacks for Java (native code)", - "output": "src/controller/java/zap-generated/CHIPInvokeCallbacks.h" - }, - { - "path": "CHIPClientCallbacks.zapt", - "name": "CHIP Client Callbacks header", - "output": "src/controller/java/zap-generated/CHIPClientCallbacks.h" - }, - { - "path": "CHIPInvokeCallbacks-src.zapt", - "name": "CHIP cluster invoke callbacks for Java (native code)", - "output": "src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp" - }, - { - "path": "CHIPClustersWrite-JNI.zapt", - "name": "CHIP ZCL API for Java (native code for writes)", - "output": "src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp" - }, - { - "path": "CHIPReadCallbacks-src.zapt", - "name": "CHIP cluster attribute read callback for Java (native code)", - "output": "src/controller/java/zap-generated/CHIPReadCallbacks.cpp" - }, { "path": "CHIPAttributeTLVValueDecoder-src.zapt", "name": "CHIP cluster attribute decoder for Java (native code)", diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h deleted file mode 100644 index bf6a6fe38921ea..00000000000000 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ /dev/null @@ -1,1234 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -// List specific responses -typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*IdentifyEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GroupsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GroupsAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffSwitchConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LevelControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LevelControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LevelControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BinaryInputBasicGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BinaryInputBasicAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BinaryInputBasicEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PulseWidthModulationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PulseWidthModulationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PulseWidthModulationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*PulseWidthModulationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorDeviceTypeListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorServerListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorClientListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorPartsListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorTagListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BindingBindingListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BindingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BindingAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlAclListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); -typedef void (*AccessControlExtensionListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); -typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsActionListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsEndpointListsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BasicInformationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BasicInformationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BasicInformationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BasicInformationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateProviderEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); -typedef void (*OtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateRequestorEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateRequestorAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitLocalizationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitLocalizationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitLocalizationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UnitLocalizationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceActiveBatFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceActiveBatChargeFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceEndpointListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralCommissioningEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningNetworksListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & data); -typedef void (*NetworkCommissioningSupportedWiFiBandsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DiagnosticLogsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DiagnosticLogsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsActiveRadioFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & data); -typedef void (*SoftwareDiagnosticsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SoftwareDiagnosticsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SoftwareDiagnosticsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsNeighborTableListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & data); -typedef void (*ThreadNetworkDiagnosticsRouteTableListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & data); -typedef void (*ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WiFiNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EthernetNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeSynchronizationTimeZoneListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*TimeSynchronizationDSTOffsetListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*TimeSynchronizationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeSynchronizationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeSynchronizationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TimeSynchronizationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BridgedDeviceBasicInformationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BridgedDeviceBasicInformationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SwitchEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SwitchAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AdministratorCommissioningGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AdministratorCommissioningAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AdministratorCommissioningEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsNOCsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*OperationalCredentialsFabricsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & data); -typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GroupKeyManagementGroupKeyMapListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*GroupKeyManagementGroupTableListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*GroupKeyManagementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GroupKeyManagementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GroupKeyManagementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelLabelListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelLabelListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyConfigurationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyDiscoveryGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyDiscoveryAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyDiscoveryEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyDiscoveryAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyValidGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyValidAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyValidEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyValidAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*IcdManagementRegisteredClientsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> & data); -typedef void (*IcdManagementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IcdManagementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IcdManagementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*IcdManagementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimerGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TimerAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TimerEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TimerAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OvenCavityOperationalStatePhaseListListAttributeCallback)( - void * context, const chip::app::DataModel::Nullable> & data); -typedef void (*OvenCavityOperationalStateOperationalStateListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & data); -typedef void (*OvenCavityOperationalStateGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenCavityOperationalStateAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenCavityOperationalStateEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenCavityOperationalStateAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OvenModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenModeAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OvenModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OvenModeAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryDryerControlsSupportedDrynessLevelsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryDryerControlsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryDryerControlsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryDryerControlsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryDryerControlsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*LaundryWasherModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & data); -typedef void (*RefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAndTemperatureControlledCabinetModeEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAndTemperatureControlledCabinetModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsSpinSpeedsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsSupportedRinsesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LaundryWasherControlsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcRunModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcRunModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcRunModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcRunModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcRunModeAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcCleanModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcCleanModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcCleanModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcCleanModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcCleanModeAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*DishwasherModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCoAlarmGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCoAlarmAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCoAlarmEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCoAlarmAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherAlarmGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherAlarmAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherAlarmEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DishwasherAlarmAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*MicrowaveOvenModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenControlSupportedWattsListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MicrowaveOvenControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStatePhaseListListAttributeCallback)( - void * context, const chip::app::DataModel::Nullable> & data); -typedef void (*OperationalStateOperationalStateListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & data); -typedef void (*OperationalStateGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcOperationalStatePhaseListListAttributeCallback)( - void * context, const chip::app::DataModel::Nullable> & data); -typedef void (*RvcOperationalStateOperationalStateListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & data); -typedef void (*RvcOperationalStateGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcOperationalStateAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RvcOperationalStateEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RvcOperationalStateAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesManagementFabricSceneInfoListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*ScenesManagementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesManagementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesManagementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesManagementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HepaFilterMonitoringReplacementProductListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & data); -typedef void (*HepaFilterMonitoringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HepaFilterMonitoringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HepaFilterMonitoringEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*HepaFilterMonitoringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringReplacementProductListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & data); -typedef void (*ActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ValveConfigurationAndControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ValveConfigurationAndControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ValveConfigurationAndControlEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ValveConfigurationAndControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalEnergyMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalEnergyMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalEnergyMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalEnergyMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DemandResponseLoadControlLoadControlProgramsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> & data); -typedef void (*DemandResponseLoadControlEventsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & data); -typedef void (*DemandResponseLoadControlActiveEventsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & data); -typedef void (*DemandResponseLoadControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DemandResponseLoadControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DemandResponseLoadControlEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DemandResponseLoadControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementPowerAdjustmentCapabilityListAttributeCallback)( - void * context, - const chip::app::DataModel::Nullable> & data); -typedef void (*DeviceEnergyManagementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceEnergyBalancesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceEnergyPrioritiesListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceLowPowerModeSensitivitiesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyPreferenceAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*EnergyEvseModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseModeEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*EnergyEvseModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementModeSupportedModesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DeviceEnergyManagementMode::Structs::ModeOptionStruct::DecodableType> & data); -typedef void (*DeviceEnergyManagementModeGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementModeAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementModeEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DeviceEnergyManagementModeAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockAliroExpeditedTransactionSupportedProtocolVersionsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockAliroSupportedBLEUWBProtocolVersionsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WindowCoveringEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WindowCoveringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BarrierControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BarrierControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BarrierControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BarrierControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PumpConfigurationAndControlEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatPresetTypesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatScheduleTypesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatPresetsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatSchedulesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FanControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FanControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FanControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FanControlAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatUserInterfaceConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ColorControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ColorControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ColorControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BallastConfigurationGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BallastConfigurationAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BallastConfigurationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*BallastConfigurationAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IlluminanceMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IlluminanceMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IlluminanceMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PressureMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PressureMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PressureMeasurementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*PressureMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FlowMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FlowMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FlowMeasurementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FlowMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RelativeHumidityMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OccupancySensingGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OccupancySensingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OccupancySensingAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm25ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm25ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm25ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm25ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm1ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm1ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm1ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm1ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm10ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm10ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm10ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*Pm10ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLanGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLanAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLanEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLanAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelChannelListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TargetNavigatorTargetListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TargetNavigatorEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TargetNavigatorAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaPlaybackAvailableAudioTracksListAttributeCallback)( - void * context, - const chip::app::DataModel::Nullable< - chip::app::DataModel::DecodableList> & data); -typedef void (*MediaPlaybackAvailableTextTracksListAttributeCallback)( - void * context, - const chip::app::DataModel::Nullable< - chip::app::DataModel::DecodableList> & data); -typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaPlaybackEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MediaPlaybackAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputInputListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LowPowerGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LowPowerAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LowPowerEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*KeypadInputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputOutputListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccountLoginGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccountLoginAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccountLoginEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentControlOnDemandRatingsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*ContentControlScheduledContentRatingsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*ContentControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentAppObserverGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentAppObserverAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentAppObserverEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ContentAppObserverAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingListInt8uListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingListOctetStringListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingListStructOctetStringListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & - data); -typedef void (*UnitTestingListNullablesAndOptionalsStructListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & data); -typedef void (*UnitTestingListLongOctetStringListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingListFabricScopedListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FaultInjectionGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FaultInjectionAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FaultInjectionEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*FaultInjectionAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SampleMeiGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SampleMeiAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SampleMeiEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SampleMeiAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp deleted file mode 100644 index 489d47c4af17ce..00000000000000 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ /dev/null @@ -1,15221 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#include "CHIPInvokeCallbacks.h" -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wshorten-64-to-32" - -#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME - -using namespace chip; -using namespace chip::Controller; - -JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffSwitchConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writeActiveTextAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writeDescriptionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writeInactiveTextAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BinaryInputBasicCluster, writeReliabilityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BindingCluster, writeBindingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Binding::Attributes::Binding::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_nodeItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "node", "Ljava/util/Optional;", element_0_nodeItem_1); - if (element_0_nodeItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nodeItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_2)); - } - } - jobject element_0_groupItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "group", "Ljava/util/Optional;", - element_0_groupItem_1); - if (element_0_groupItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_groupItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_endpointItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "endpoint", "Ljava/util/Optional;", - element_0_endpointItem_1); - if (element_0_endpointItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_endpointItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_clusterItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "cluster", "Ljava/util/Optional;", - element_0_clusterItem_1); - if (element_0_clusterItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_clusterItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_2)); - } - } - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BindingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, AccessControlCluster, writeAclAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_privilegeItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "privilege", "Ljava/lang/Integer;", - element_0_privilegeItem_1); - listHolder_0->mList[i_0].privilege = - static_castmList[i_0].privilege)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_privilegeItem_1)); - jobject element_0_authModeItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "authMode", "Ljava/lang/Integer;", - element_0_authModeItem_1); - listHolder_0->mList[i_0].authMode = - static_castmList[i_0].authMode)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_authModeItem_1)); - jobject element_0_subjectsItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "subjects", "Ljava/util/ArrayList;", - element_0_subjectsItem_1); - if (element_0_subjectsItem_1 == nullptr) - { - listHolder_0->mList[i_0].subjects.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - jint element_0_subjectsItem_1Size; - chip::JniReferences::GetInstance().GetListSize(element_0_subjectsItem_1, element_0_subjectsItem_1Size); - if (element_0_subjectsItem_1Size != 0) - { - auto * listHolder_3 = new ListHolder(element_0_subjectsItem_1Size); - listFreer.add(listHolder_3); - - for (jint i_3 = 0; i_3 < element_0_subjectsItem_1Size; ++i_3) - { - jobject element_3; - chip::JniReferences::GetInstance().GetListItem(element_0_subjectsItem_1, i_3, element_3); - listHolder_3->mList[i_3] = static_castmList[i_3])>>( - chip::JniReferences::GetInstance().LongToPrimitive(element_3)); - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_subjectsItem_1Size); - } - else - { - nonNullValue_2 = ListType_3(); - } - } - } - jobject element_0_targetsItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "targets", "Ljava/util/ArrayList;", - element_0_targetsItem_1); - if (element_0_targetsItem_1 == nullptr) - { - listHolder_0->mList[i_0].targets.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - jint element_0_targetsItem_1Size; - chip::JniReferences::GetInstance().GetListSize(element_0_targetsItem_1, element_0_targetsItem_1Size); - if (element_0_targetsItem_1Size != 0) - { - auto * listHolder_3 = new ListHolder(element_0_targetsItem_1Size); - listFreer.add(listHolder_3); - - for (jint i_3 = 0; i_3 < element_0_targetsItem_1Size; ++i_3) - { - jobject element_3; - chip::JniReferences::GetInstance().GetListItem(element_0_targetsItem_1, i_3, element_3); - jobject element_3_clusterItem_4; - chip::JniReferences::GetInstance().GetObjectField(element_3, "cluster", "Ljava/lang/Long;", - element_3_clusterItem_4); - if (element_3_clusterItem_4 == nullptr) - { - listHolder_3->mList[i_3].cluster.SetNull(); - } - else - { - auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); - nonNullValue_5 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(element_3_clusterItem_4)); - } - jobject element_3_endpointItem_4; - chip::JniReferences::GetInstance().GetObjectField(element_3, "endpoint", "Ljava/lang/Integer;", - element_3_endpointItem_4); - if (element_3_endpointItem_4 == nullptr) - { - listHolder_3->mList[i_3].endpoint.SetNull(); - } - else - { - auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); - nonNullValue_5 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_3_endpointItem_4)); - } - jobject element_3_deviceTypeItem_4; - chip::JniReferences::GetInstance().GetObjectField(element_3, "deviceType", "Ljava/lang/Long;", - element_3_deviceTypeItem_4); - if (element_3_deviceTypeItem_4 == nullptr) - { - listHolder_3->mList[i_3].deviceType.SetNull(); - } - else - { - auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); - nonNullValue_5 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(element_3_deviceTypeItem_4)); - } - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_targetsItem_1Size); - } - else - { - nonNullValue_2 = ListType_3(); - } - } - } - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, AccessControlCluster, writeExtensionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_dataItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "data", "[B", element_0_dataItem_1); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_dataItem_1))); - listHolder_0->mList[i_0].data = cleanupByteArrays.back()->byteSpan(); - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BasicInformationCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BasicInformationCluster, writeLocationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BasicInformation::Attributes::Location::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BasicInformationCluster, writeLocalConfigDisabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOTAProvidersAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_providerNodeIDItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "providerNodeID", "Ljava/lang/Long;", - element_0_providerNodeIDItem_1); - listHolder_0->mList[i_0].providerNodeID = - static_castmList[i_0].providerNodeID)>>( - chip::JniReferences::GetInstance().LongToPrimitive(element_0_providerNodeIDItem_1)); - jobject element_0_endpointItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "endpoint", "Ljava/lang/Integer;", - element_0_endpointItem_1); - listHolder_0->mList[i_0].endpoint = - static_castmList[i_0].endpoint)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_endpointItem_1)); - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LocalizationConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TimeFormatLocalizationCluster, writeHourFormatAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TimeFormatLocalizationCluster, writeActiveCalendarTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitLocalizationCluster, writeTemperatureUnitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BridgedDeviceBasicInformationCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BridgedDeviceBasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, GroupKeyManagementCluster, writeGroupKeyMapAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_groupIdItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "groupId", "Ljava/lang/Integer;", - element_0_groupIdItem_1); - listHolder_0->mList[i_0].groupId = static_castmList[i_0].groupId)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_groupIdItem_1)); - jobject element_0_groupKeySetIDItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "groupKeySetID", "Ljava/lang/Integer;", - element_0_groupKeySetIDItem_1); - listHolder_0->mList[i_0].groupKeySetID = - static_castmList[i_0].groupKeySetID)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_groupKeySetIDItem_1)); - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - GroupKeyManagementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_labelItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "label", "Ljava/lang/String;", element_0_labelItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_labelItem_1))); - listHolder_0->mList[i_0].label = cleanupStrings.back()->charSpan(); - jobject element_0_valueItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "value", "Ljava/lang/String;", element_0_valueItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_valueItem_1))); - listHolder_0->mList[i_0].value = cleanupStrings.back()->charSpan(); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UserLabelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OvenModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OvenMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OvenModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OvenModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OvenMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OvenModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryDryerControlsCluster, writeSelectedDrynessLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryDryerControlsCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ModeSelectCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryWasherModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryWasherModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RefrigeratorAndTemperatureControlledCabinetModeCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RefrigeratorAndTemperatureControlledCabinetModeCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryWasherControlsCluster, writeSpinSpeedCurrentAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryWasherControlsCluster, writeNumberOfRinsesAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RvcRunModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RvcRunMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RvcRunModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RvcCleanModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RvcCleanModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DishwasherModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DishwasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DishwasherModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DishwasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, SmokeCoAlarmCluster, writeSmokeSensitivityLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - SmokeCoAlarmCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, HepaFilterMonitoringCluster, writeLastChangedTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - HepaFilterMonitoringCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ActivatedCarbonFilterMonitoringCluster, writeLastChangedTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ActivatedCarbonFilterMonitoringCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BooleanStateConfigurationCluster, writeCurrentSensitivityLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BooleanStateConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ValveConfigurationAndControlCluster, writeDefaultOpenDurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ValveConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ValveConfigurationAndControlCluster, writeDefaultOpenLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ValveConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DemandResponseLoadControlCluster, writeDefaultRandomStartAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DemandResponseLoadControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DemandResponseLoadControlCluster, writeDefaultRandomDurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DemandResponseLoadControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyEvseCluster, writeUserMaximumChargeCurrentAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyEvseCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyEvseCluster, writeRandomizationDelayWindowAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyEvseCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyEvseCluster, writeApproximateEVEfficiencyAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyEvseCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyPreferenceCluster, writeCurrentEnergyBalanceAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyPreferenceCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyPreferenceCluster, writeCurrentLowPowerModeSensitivityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyPreferenceCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyEvseModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyEvseModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, EnergyEvseModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - EnergyEvseModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DeviceEnergyManagementModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DeviceEnergyManagementModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DeviceEnergyManagementModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DeviceEnergyManagementModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeDoorOpenEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeDoorClosedEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeOpenPeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeLEDSettingsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LEDSettings::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeEnableLocalProgrammingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeEnableInsideStatusLEDAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeLocalProgrammingFeaturesAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeUserCodeTemporaryDisableTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeSendPINOverTheAirAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeRequirePINforRemoteOperationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DoorLockCluster, writeExpiringUserTimeoutAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - WindowCoveringCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierOpenEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierCloseEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierCommandOpenEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierCommandCloseEventsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierOpenPeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BarrierControlCluster, writeBarrierClosePeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeHVACSystemTypeConfigurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeLocalTemperatureCalibrationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeUnoccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeUnoccupiedHeatingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeRemoteSensingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeTemperatureSetpointHoldAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeTemperatureSetpointHoldDurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeThermostatProgrammingOperationModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeOccupiedSetbackAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeUnoccupiedSetbackAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeEmergencyHeatDeltaAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACCapacityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACRefrigerantTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACCompressorTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACErrorCodeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACLouverPositionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeACCapacityformatAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writePresetsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::Presets::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_presetHandleItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "presetHandle", "[B", element_0_presetHandleItem_1); - if (element_0_presetHandleItem_1 == nullptr) - { - listHolder_0->mList[i_0].presetHandle.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].presetHandle.SetNonNull(); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_presetHandleItem_1))); - nonNullValue_2 = cleanupByteArrays.back()->byteSpan(); - } - jobject element_0_presetScenarioItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "presetScenario", "Ljava/lang/Integer;", - element_0_presetScenarioItem_1); - listHolder_0->mList[i_0].presetScenario = - static_castmList[i_0].presetScenario)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_presetScenarioItem_1)); - jobject element_0_nameItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "name", "Ljava/util/Optional;", element_0_nameItem_1); - if (element_0_nameItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nameItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); - nonNullValue_3 = cleanupStrings.back()->charSpan(); - } - } - } - jobject element_0_coolingSetpointItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "coolingSetpoint", "Ljava/util/Optional;", - element_0_coolingSetpointItem_1); - if (element_0_coolingSetpointItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_coolingSetpointItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].coolingSetpoint.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_heatingSetpointItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "heatingSetpoint", "Ljava/util/Optional;", - element_0_heatingSetpointItem_1); - if (element_0_heatingSetpointItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_heatingSetpointItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].heatingSetpoint.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_builtInItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "builtIn", "Ljava/lang/Boolean;", - element_0_builtInItem_1); - if (element_0_builtInItem_1 == nullptr) - { - listHolder_0->mList[i_0].builtIn.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); - nonNullValue_2 = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_builtInItem_1)); - } - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatCluster, writeSchedulesAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::Schedules::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_scheduleHandleItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "scheduleHandle", "[B", - element_0_scheduleHandleItem_1); - if (element_0_scheduleHandleItem_1 == nullptr) - { - listHolder_0->mList[i_0].scheduleHandle.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].scheduleHandle.SetNonNull(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_scheduleHandleItem_1))); - nonNullValue_2 = cleanupByteArrays.back()->byteSpan(); - } - jobject element_0_systemModeItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "systemMode", "Ljava/lang/Integer;", - element_0_systemModeItem_1); - listHolder_0->mList[i_0].systemMode = - static_castmList[i_0].systemMode)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_systemModeItem_1)); - jobject element_0_nameItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "name", "Ljava/util/Optional;", element_0_nameItem_1); - if (element_0_nameItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nameItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); - definedValue_2 = cleanupStrings.back()->charSpan(); - } - } - jobject element_0_presetHandleItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "presetHandle", "Ljava/util/Optional;", - element_0_presetHandleItem_1); - if (element_0_presetHandleItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_presetHandleItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].presetHandle.Emplace(); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); - definedValue_2 = cleanupByteArrays.back()->byteSpan(); - } - } - jobject element_0_transitionsItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "transitions", "Ljava/util/ArrayList;", - element_0_transitionsItem_1); - { - using ListType_2 = std::remove_reference_tmList[i_0].transitions)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - jint element_0_transitionsItem_1Size; - chip::JniReferences::GetInstance().GetListSize(element_0_transitionsItem_1, element_0_transitionsItem_1Size); - if (element_0_transitionsItem_1Size != 0) - { - auto * listHolder_2 = new ListHolder(element_0_transitionsItem_1Size); - listFreer.add(listHolder_2); - - for (jint i_2 = 0; i_2 < element_0_transitionsItem_1Size; ++i_2) - { - jobject element_2; - chip::JniReferences::GetInstance().GetListItem(element_0_transitionsItem_1, i_2, element_2); - jobject element_2_dayOfWeekItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "dayOfWeek", "Ljava/lang/Integer;", - element_2_dayOfWeekItem_3); - listHolder_2->mList[i_2].dayOfWeek.SetRaw( - static_castmList[i_2].dayOfWeek)>::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_dayOfWeekItem_3))); - jobject element_2_transitionTimeItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "transitionTime", "Ljava/lang/Integer;", - element_2_transitionTimeItem_3); - listHolder_2->mList[i_2].transitionTime = - static_castmList[i_2].transitionTime)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_transitionTimeItem_3)); - jobject element_2_presetHandleItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "presetHandle", "Ljava/util/Optional;", - element_2_presetHandleItem_3); - if (element_2_presetHandleItem_3 != nullptr) - { - jobject optionalValue_4; - chip::JniReferences::GetInstance().GetOptionalValue(element_2_presetHandleItem_3, optionalValue_4); - if (optionalValue_4 != nullptr) - { - auto & definedValue_4 = listHolder_2->mList[i_2].presetHandle.Emplace(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique( - env, static_cast(optionalValue_4))); - definedValue_4 = cleanupByteArrays.back()->byteSpan(); - } - } - jobject element_2_systemModeItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "systemMode", "Ljava/util/Optional;", - element_2_systemModeItem_3); - if (element_2_systemModeItem_3 != nullptr) - { - jobject optionalValue_4; - chip::JniReferences::GetInstance().GetOptionalValue(element_2_systemModeItem_3, optionalValue_4); - if (optionalValue_4 != nullptr) - { - auto & definedValue_4 = listHolder_2->mList[i_2].systemMode.Emplace(); - definedValue_4 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); - } - } - jobject element_2_coolingSetpointItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "coolingSetpoint", "Ljava/util/Optional;", - element_2_coolingSetpointItem_3); - if (element_2_coolingSetpointItem_3 != nullptr) - { - jobject optionalValue_4; - chip::JniReferences::GetInstance().GetOptionalValue(element_2_coolingSetpointItem_3, - optionalValue_4); - if (optionalValue_4 != nullptr) - { - auto & definedValue_4 = listHolder_2->mList[i_2].coolingSetpoint.Emplace(); - definedValue_4 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); - } - } - jobject element_2_heatingSetpointItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "heatingSetpoint", "Ljava/util/Optional;", - element_2_heatingSetpointItem_3); - if (element_2_heatingSetpointItem_3 != nullptr) - { - jobject optionalValue_4; - chip::JniReferences::GetInstance().GetOptionalValue(element_2_heatingSetpointItem_3, - optionalValue_4); - if (optionalValue_4 != nullptr) - { - auto & definedValue_4 = listHolder_2->mList[i_2].heatingSetpoint.Emplace(); - definedValue_4 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); - } - } - } - listHolder_0->mList[i_0].transitions = ListType_2(listHolder_2->mList, element_0_transitionsItem_1Size); - } - else - { - listHolder_0->mList[i_0].transitions = ListType_2(); - } - } - jobject element_0_builtInItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "builtIn", "Ljava/util/Optional;", - element_0_builtInItem_1); - if (element_0_builtInItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_builtInItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].builtIn.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2)); - } - } - } - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writeFanModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::FanMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writePercentSettingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::PercentSetting::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writeSpeedSettingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::SpeedSetting::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writeRockSettingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::RockSetting::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writeWindSettingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::WindSetting::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, FanControlCluster, writeAirflowDirectionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::FanControl::Attributes::AirflowDirection::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - FanControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDisplayModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatUserInterfaceConfigurationCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockoutAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatUserInterfaceConfigurationCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgrammingVisibilityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatUserInterfaceConfigurationCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeMinLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeMaxLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeIntrinsicBallastFactorAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeBallastFactorAdjustmentAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampType::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampManufacturerAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampRatedHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampBurnHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampAlarmModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, BallastConfigurationCluster, writeLampBurnHoursTripPointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BallastConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePIROccupiedToUnoccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePIRUnoccupiedToOccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePIRUnoccupiedToOccupiedThresholdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writeUltrasonicOccupiedToUnoccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writeUltrasonicUnoccupiedToOccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writeUltrasonicUnoccupiedToOccupiedThresholdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePhysicalContactOccupiedToUnoccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePhysicalContactUnoccupiedToOccupiedDelayAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, OccupancySensingCluster, writePhysicalContactUnoccupiedToOccupiedThresholdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeAverageRmsVoltageMeasurementPeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeAverageRmsUnderVoltageCounterAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeRmsExtremeOverVoltagePeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeRmsExtremeUnderVoltagePeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeRmsVoltageSagPeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeRmsVoltageSwellPeriodAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeOverloadAlarmsMaskAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, writeAcOverloadAlarmsMaskAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Boolean::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap8::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap16::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap32::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Bitmap64::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int16u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int24u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int32u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int40u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int48u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int56u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int64u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int8s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int16s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int24s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int32s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int40s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int48s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int56s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Int64s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Enum8::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Enum16::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::FloatSingle::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().FloatToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::FloatDouble::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().DoubleToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::OctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupByteArrays.back()->byteSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListOctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0))); - listHolder_0->mList[i_0] = cleanupByteArrays.back()->byteSpan(); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListStructOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_member1Item_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "member1", "Ljava/lang/Long;", - element_0_member1Item_1); - listHolder_0->mList[i_0].member1 = static_castmList[i_0].member1)>>( - chip::JniReferences::GetInstance().LongToPrimitive(element_0_member1Item_1)); - jobject element_0_member2Item_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "member2", "[B", element_0_member2Item_1); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_member2Item_1))); - listHolder_0->mList[i_0].member2 = cleanupByteArrays.back()->byteSpan(); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeLongOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::LongOctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupByteArrays.back()->byteSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::CharString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeLongCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::LongCharString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - cppValue = cleanupStrings.back()->charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeEpochUsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EpochUs::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeEpochSAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EpochS::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::VendorId::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListNullablesAndOptionalsStructAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_nullableIntItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableInt", "Ljava/lang/Integer;", - element_0_nullableIntItem_1); - if (element_0_nullableIntItem_1 == nullptr) - { - listHolder_0->mList[i_0].nullableInt.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); - nonNullValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableIntItem_1)); - } - jobject element_0_optionalIntItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalInt", "Ljava/util/Optional;", - element_0_optionalIntItem_1); - if (element_0_optionalIntItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalIntItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_nullableOptionalIntItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalInt", "Ljava/util/Optional;", - element_0_nullableOptionalIntItem_1); - if (element_0_nullableOptionalIntItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalIntItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - } - jobject element_0_nullableStringItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableString", "Ljava/lang/String;", - element_0_nullableStringItem_1); - if (element_0_nullableStringItem_1 == nullptr) - { - listHolder_0->mList[i_0].nullableString.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0_nullableStringItem_1))); - nonNullValue_2 = cleanupStrings.back()->charSpan(); - } - jobject element_0_optionalStringItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalString", "Ljava/util/Optional;", - element_0_optionalStringItem_1); - if (element_0_optionalStringItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalStringItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); - definedValue_2 = cleanupStrings.back()->charSpan(); - } - } - jobject element_0_nullableOptionalStringItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalString", "Ljava/util/Optional;", - element_0_nullableOptionalStringItem_1); - if (element_0_nullableOptionalStringItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalStringItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); - nonNullValue_3 = cleanupStrings.back()->charSpan(); - } - } - } - jobject element_0_nullableStructItem_1; - chip::JniReferences::GetInstance().GetObjectField( - element_0, "nullableStruct", "Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;", - element_0_nullableStructItem_1); - if (element_0_nullableStructItem_1 == nullptr) - { - listHolder_0->mList[i_0].nullableStruct.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); - jobject element_0_nullableStructItem_1_aItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "a", "Ljava/lang/Integer;", - element_0_nullableStructItem_1_aItem_3); - nonNullValue_2.a = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_aItem_3)); - jobject element_0_nullableStructItem_1_bItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "b", "Ljava/lang/Boolean;", - element_0_nullableStructItem_1_bItem_3); - nonNullValue_2.b = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_nullableStructItem_1_bItem_3)); - jobject element_0_nullableStructItem_1_cItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "c", "Ljava/lang/Integer;", - element_0_nullableStructItem_1_cItem_3); - nonNullValue_2.c = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_cItem_3)); - jobject element_0_nullableStructItem_1_dItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "d", "[B", - element_0_nullableStructItem_1_dItem_3); - cleanupByteArrays.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_nullableStructItem_1_dItem_3))); - nonNullValue_2.d = cleanupByteArrays.back()->byteSpan(); - jobject element_0_nullableStructItem_1_eItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "e", "Ljava/lang/String;", - element_0_nullableStructItem_1_eItem_3); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_nullableStructItem_1_eItem_3))); - nonNullValue_2.e = cleanupStrings.back()->charSpan(); - jobject element_0_nullableStructItem_1_fItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "f", "Ljava/lang/Integer;", - element_0_nullableStructItem_1_fItem_3); - nonNullValue_2.f.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_fItem_3))); - jobject element_0_nullableStructItem_1_gItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "g", "Ljava/lang/Float;", - element_0_nullableStructItem_1_gItem_3); - nonNullValue_2.g = static_cast>( - chip::JniReferences::GetInstance().FloatToPrimitive(element_0_nullableStructItem_1_gItem_3)); - jobject element_0_nullableStructItem_1_hItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "h", "Ljava/lang/Double;", - element_0_nullableStructItem_1_hItem_3); - nonNullValue_2.h = static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(element_0_nullableStructItem_1_hItem_3)); - } - jobject element_0_optionalStructItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalStruct", "Ljava/util/Optional;", - element_0_optionalStructItem_1); - if (element_0_optionalStructItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalStructItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); - jobject optionalValue_2_aItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "a", "Ljava/lang/Integer;", - optionalValue_2_aItem_3); - definedValue_2.a = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_aItem_3)); - jobject optionalValue_2_bItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "b", "Ljava/lang/Boolean;", - optionalValue_2_bItem_3); - definedValue_2.b = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2_bItem_3)); - jobject optionalValue_2_cItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "c", "Ljava/lang/Integer;", - optionalValue_2_cItem_3); - definedValue_2.c = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_3)); - jobject optionalValue_2_dItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_3); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2_dItem_3))); - definedValue_2.d = cleanupByteArrays.back()->byteSpan(); - jobject optionalValue_2_eItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", - optionalValue_2_eItem_3); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2_eItem_3))); - definedValue_2.e = cleanupStrings.back()->charSpan(); - jobject optionalValue_2_fItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", - optionalValue_2_fItem_3); - definedValue_2.f.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_fItem_3))); - jobject optionalValue_2_gItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "g", "Ljava/lang/Float;", - optionalValue_2_gItem_3); - definedValue_2.g = static_cast>( - chip::JniReferences::GetInstance().FloatToPrimitive(optionalValue_2_gItem_3)); - jobject optionalValue_2_hItem_3; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "h", "Ljava/lang/Double;", - optionalValue_2_hItem_3); - definedValue_2.h = static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_2_hItem_3)); - } - } - jobject element_0_nullableOptionalStructItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalStruct", "Ljava/util/Optional;", - element_0_nullableOptionalStructItem_1); - if (element_0_nullableOptionalStructItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalStructItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - jobject optionalValue_2_aItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "a", "Ljava/lang/Integer;", - optionalValue_2_aItem_4); - nonNullValue_3.a = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_aItem_4)); - jobject optionalValue_2_bItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "b", "Ljava/lang/Boolean;", - optionalValue_2_bItem_4); - nonNullValue_3.b = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2_bItem_4)); - jobject optionalValue_2_cItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "c", "Ljava/lang/Integer;", - optionalValue_2_cItem_4); - nonNullValue_3.c = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_4)); - jobject optionalValue_2_dItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_4); - cleanupByteArrays.push_back(chip::Platform::MakeUnique( - env, static_cast(optionalValue_2_dItem_4))); - nonNullValue_3.d = cleanupByteArrays.back()->byteSpan(); - jobject optionalValue_2_eItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", - optionalValue_2_eItem_4); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(optionalValue_2_eItem_4))); - nonNullValue_3.e = cleanupStrings.back()->charSpan(); - jobject optionalValue_2_fItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", - optionalValue_2_fItem_4); - nonNullValue_3.f.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_fItem_4))); - jobject optionalValue_2_gItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "g", "Ljava/lang/Float;", - optionalValue_2_gItem_4); - nonNullValue_3.g = static_cast>( - chip::JniReferences::GetInstance().FloatToPrimitive(optionalValue_2_gItem_4)); - jobject optionalValue_2_hItem_4; - chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "h", "Ljava/lang/Double;", - optionalValue_2_hItem_4); - nonNullValue_3.h = static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_2_hItem_4)); - } - } - } - jobject element_0_nullableListItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableList", "Ljava/util/ArrayList;", - element_0_nullableListItem_1); - if (element_0_nullableListItem_1 == nullptr) - { - listHolder_0->mList[i_0].nullableList.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - jint element_0_nullableListItem_1Size; - chip::JniReferences::GetInstance().GetListSize(element_0_nullableListItem_1, - element_0_nullableListItem_1Size); - if (element_0_nullableListItem_1Size != 0) - { - auto * listHolder_3 = new ListHolder(element_0_nullableListItem_1Size); - listFreer.add(listHolder_3); - - for (jint i_3 = 0; i_3 < element_0_nullableListItem_1Size; ++i_3) - { - jobject element_3; - chip::JniReferences::GetInstance().GetListItem(element_0_nullableListItem_1, i_3, element_3); - listHolder_3->mList[i_3] = static_castmList[i_3])>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_3)); - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_nullableListItem_1Size); - } - else - { - nonNullValue_2 = ListType_3(); - } - } - } - jobject element_0_optionalListItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalList", "Ljava/util/Optional;", - element_0_optionalListItem_1); - if (element_0_optionalListItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalListItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - jint optionalValue_2Size; - chip::JniReferences::GetInstance().GetListSize(optionalValue_2, optionalValue_2Size); - if (optionalValue_2Size != 0) - { - auto * listHolder_3 = new ListHolder(optionalValue_2Size); - listFreer.add(listHolder_3); - - for (jint i_3 = 0; i_3 < optionalValue_2Size; ++i_3) - { - jobject element_3; - chip::JniReferences::GetInstance().GetListItem(optionalValue_2, i_3, element_3); - listHolder_3->mList[i_3] = - static_castmList[i_3])>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_3)); - } - definedValue_2 = ListType_3(listHolder_3->mList, optionalValue_2Size); - } - else - { - definedValue_2 = ListType_3(); - } - } - } - } - jobject element_0_nullableOptionalListItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalList", "Ljava/util/Optional;", - element_0_nullableOptionalListItem_1); - if (element_0_nullableOptionalListItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalListItem_1, optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - jint optionalValue_2Size; - chip::JniReferences::GetInstance().GetListSize(optionalValue_2, optionalValue_2Size); - if (optionalValue_2Size != 0) - { - auto * listHolder_4 = new ListHolder(optionalValue_2Size); - listFreer.add(listHolder_4); - - for (jint i_4 = 0; i_4 < optionalValue_2Size; ++i_4) - { - jobject element_4; - chip::JniReferences::GetInstance().GetListItem(optionalValue_2, i_4, element_4); - listHolder_4->mList[i_4] = - static_castmList[i_4])>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_4)); - } - nonNullValue_3 = ListType_4(listHolder_4->mList, optionalValue_2Size); - } - else - { - nonNullValue_3 = ListType_4(); - } - } - } - } - } - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::EnumAttr::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListLongOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - cleanupByteArrays.push_back( - chip::Platform::MakeUnique(env, static_cast(element_0))); - listHolder_0->mList[i_0] = cleanupByteArrays.back()->byteSpan(); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeListFabricScopedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (jint i_0 = 0; i_0 < valueSize; ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); - jobject element_0_fabricSensitiveInt8uItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricSensitiveInt8u", "Ljava/lang/Integer;", - element_0_fabricSensitiveInt8uItem_1); - listHolder_0->mList[i_0].fabricSensitiveInt8u = - static_castmList[i_0].fabricSensitiveInt8u)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricSensitiveInt8uItem_1)); - jobject element_0_optionalFabricSensitiveInt8uItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalFabricSensitiveInt8u", "Ljava/util/Optional;", - element_0_optionalFabricSensitiveInt8uItem_1); - if (element_0_optionalFabricSensitiveInt8uItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalFabricSensitiveInt8uItem_1, - optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); - definedValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - jobject element_0_nullableFabricSensitiveInt8uItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableFabricSensitiveInt8u", "Ljava/lang/Integer;", - element_0_nullableFabricSensitiveInt8uItem_1); - if (element_0_nullableFabricSensitiveInt8uItem_1 == nullptr) - { - listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); - } - else - { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); - nonNullValue_2 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableFabricSensitiveInt8uItem_1)); - } - jobject element_0_nullableOptionalFabricSensitiveInt8uItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalFabricSensitiveInt8u", - "Ljava/util/Optional;", - element_0_nullableOptionalFabricSensitiveInt8uItem_1); - if (element_0_nullableOptionalFabricSensitiveInt8uItem_1 != nullptr) - { - jobject optionalValue_2; - chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalFabricSensitiveInt8uItem_1, - optionalValue_2); - if (optionalValue_2 != nullptr) - { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); - if (optionalValue_2 == nullptr) - { - definedValue_2.SetNull(); - } - else - { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); - } - } - } - jobject element_0_fabricSensitiveCharStringItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricSensitiveCharString", "Ljava/lang/String;", - element_0_fabricSensitiveCharStringItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_fabricSensitiveCharStringItem_1))); - listHolder_0->mList[i_0].fabricSensitiveCharString = cleanupStrings.back()->charSpan(); - jobject element_0_fabricSensitiveStructItem_1; - chip::JniReferences::GetInstance().GetObjectField( - element_0, "fabricSensitiveStruct", "Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;", - element_0_fabricSensitiveStructItem_1); - jobject element_0_fabricSensitiveStructItem_1_aItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "a", "Ljava/lang/Integer;", - element_0_fabricSensitiveStructItem_1_aItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.a = - static_castmList[i_0].fabricSensitiveStruct.a)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricSensitiveStructItem_1_aItem_2)); - jobject element_0_fabricSensitiveStructItem_1_bItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "b", "Ljava/lang/Boolean;", - element_0_fabricSensitiveStructItem_1_bItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.b = - static_castmList[i_0].fabricSensitiveStruct.b)>>( - chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_fabricSensitiveStructItem_1_bItem_2)); - jobject element_0_fabricSensitiveStructItem_1_cItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "c", "Ljava/lang/Integer;", - element_0_fabricSensitiveStructItem_1_cItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.c = - static_castmList[i_0].fabricSensitiveStruct.c)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricSensitiveStructItem_1_cItem_2)); - jobject element_0_fabricSensitiveStructItem_1_dItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "d", "[B", - element_0_fabricSensitiveStructItem_1_dItem_2); - cleanupByteArrays.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_fabricSensitiveStructItem_1_dItem_2))); - listHolder_0->mList[i_0].fabricSensitiveStruct.d = cleanupByteArrays.back()->byteSpan(); - jobject element_0_fabricSensitiveStructItem_1_eItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "e", "Ljava/lang/String;", - element_0_fabricSensitiveStructItem_1_eItem_2); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(element_0_fabricSensitiveStructItem_1_eItem_2))); - listHolder_0->mList[i_0].fabricSensitiveStruct.e = cleanupStrings.back()->charSpan(); - jobject element_0_fabricSensitiveStructItem_1_fItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "f", "Ljava/lang/Integer;", - element_0_fabricSensitiveStructItem_1_fItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.f.SetRaw( - static_castmList[i_0].fabricSensitiveStruct.f)>::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricSensitiveStructItem_1_fItem_2))); - jobject element_0_fabricSensitiveStructItem_1_gItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "g", "Ljava/lang/Float;", - element_0_fabricSensitiveStructItem_1_gItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.g = - static_castmList[i_0].fabricSensitiveStruct.g)>>( - chip::JniReferences::GetInstance().FloatToPrimitive(element_0_fabricSensitiveStructItem_1_gItem_2)); - jobject element_0_fabricSensitiveStructItem_1_hItem_2; - chip::JniReferences::GetInstance().GetObjectField(element_0_fabricSensitiveStructItem_1, "h", "Ljava/lang/Double;", - element_0_fabricSensitiveStructItem_1_hItem_2); - listHolder_0->mList[i_0].fabricSensitiveStruct.h = - static_castmList[i_0].fabricSensitiveStruct.h)>>( - chip::JniReferences::GetInstance().DoubleToPrimitive(element_0_fabricSensitiveStructItem_1_hItem_2)); - jobject element_0_fabricSensitiveInt8uListItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricSensitiveInt8uList", "Ljava/util/ArrayList;", - element_0_fabricSensitiveInt8uListItem_1); - { - using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - jint element_0_fabricSensitiveInt8uListItem_1Size; - chip::JniReferences::GetInstance().GetListSize(element_0_fabricSensitiveInt8uListItem_1, - element_0_fabricSensitiveInt8uListItem_1Size); - if (element_0_fabricSensitiveInt8uListItem_1Size != 0) - { - auto * listHolder_2 = new ListHolder(element_0_fabricSensitiveInt8uListItem_1Size); - listFreer.add(listHolder_2); - - for (jint i_2 = 0; i_2 < element_0_fabricSensitiveInt8uListItem_1Size; ++i_2) - { - jobject element_2; - chip::JniReferences::GetInstance().GetListItem(element_0_fabricSensitiveInt8uListItem_1, i_2, - element_2); - listHolder_2->mList[i_2] = static_castmList[i_2])>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_2)); - } - listHolder_0->mList[i_0].fabricSensitiveInt8uList = - ListType_2(listHolder_2->mList, element_0_fabricSensitiveInt8uListItem_1Size); - } - else - { - listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); - } - } - jobject element_0_fabricIndexItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", - element_0_fabricIndexItem_1); - listHolder_0->mList[i_0].fabricIndex = - static_castmList[i_0].fabricIndex)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeTimedWriteBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeGeneralErrorBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeClusterErrorBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeUnsupportedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::Unsupported::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().FloatToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - nonNullValue_0 = cleanupByteArrays.back()->byteSpan(); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableCharString::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); - nonNullValue_0 = cleanupStrings.back()->charSpan(); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeNullableRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeWriteOnlyInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, UnitTestingCluster, writeMeiInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::UnitTesting::Attributes::MeiInt8u::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - UnitTestingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, SampleMeiCluster, writeFlipFlopAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::SampleMei::Attributes::FlipFlop::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - SampleMeiCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -#pragma clang diagnostic pop diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp deleted file mode 100644 index 8f9274f6171770..00000000000000 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ /dev/null @@ -1,8525 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#include "CHIPInvokeCallbacks.h" -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace chip { - -CHIPGroupsClusterAddGroupResponseCallback::CHIPGroupsClusterAddGroupResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsClusterAddGroupResponseCallback::~CHIPGroupsClusterAddGroupResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupsClusterAddGroupResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); -} -CHIPGroupsClusterViewGroupResponseCallback::CHIPGroupsClusterViewGroupResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsClusterViewGroupResponseCallback::~CHIPGroupsClusterViewGroupResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupsClusterViewGroupResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject GroupName; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.groupName, GroupName)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, GroupName); -} -CHIPGroupsClusterGetGroupMembershipResponseCallback::CHIPGroupsClusterGetGroupMembershipResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsClusterGetGroupMembershipResponseCallback::~CHIPGroupsClusterGetGroupMembershipResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupsClusterGetGroupMembershipResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Capacity; - if (dataResponse.capacity.IsNull()) - { - Capacity = nullptr; - } - else - { - std::string CapacityClassName = "java/lang/Integer"; - std::string CapacityCtorSignature = "(I)V"; - jint jniCapacity = static_cast(dataResponse.capacity.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), - jniCapacity, Capacity); - } - jobject GroupList; - chip::JniReferences::GetInstance().CreateArrayList(GroupList); - - auto iter_GroupList_0 = dataResponse.groupList.begin(); - while (iter_GroupList_0.Next()) - { - auto & entry_0 = iter_GroupList_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(GroupList, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Capacity, GroupList); -} -CHIPGroupsClusterRemoveGroupResponseCallback::CHIPGroupsClusterRemoveGroupResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsClusterRemoveGroupResponseCallback::~CHIPGroupsClusterRemoveGroupResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupsClusterRemoveGroupResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); -} -CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject DelayedActionTime; - if (!dataResponse.delayedActionTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DelayedActionTime); - } - else - { - jobject DelayedActionTimeInsideOptional; - std::string DelayedActionTimeInsideOptionalClassName = "java/lang/Long"; - std::string DelayedActionTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniDelayedActionTimeInsideOptional = static_cast(dataResponse.delayedActionTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - DelayedActionTimeInsideOptionalClassName.c_str(), DelayedActionTimeInsideOptionalCtorSignature.c_str(), - jniDelayedActionTimeInsideOptional, DelayedActionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(DelayedActionTimeInsideOptional, DelayedActionTime); - } - jobject ImageURI; - if (!dataResponse.imageURI.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ImageURI); - } - else - { - jobject ImageURIInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.imageURI.Value(), ImageURIInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(ImageURIInsideOptional, ImageURI); - } - jobject SoftwareVersion; - if (!dataResponse.softwareVersion.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersion); - } - else - { - jobject SoftwareVersionInsideOptional; - std::string SoftwareVersionInsideOptionalClassName = "java/lang/Long"; - std::string SoftwareVersionInsideOptionalCtorSignature = "(J)V"; - jlong jniSoftwareVersionInsideOptional = static_cast(dataResponse.softwareVersion.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - SoftwareVersionInsideOptionalClassName.c_str(), SoftwareVersionInsideOptionalCtorSignature.c_str(), - jniSoftwareVersionInsideOptional, SoftwareVersionInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionInsideOptional, SoftwareVersion); - } - jobject SoftwareVersionString; - if (!dataResponse.softwareVersionString.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersionString); - } - else - { - jobject SoftwareVersionStringInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.softwareVersionString.Value(), - SoftwareVersionStringInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionStringInsideOptional, SoftwareVersionString); - } - jobject UpdateToken; - if (!dataResponse.updateToken.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UpdateToken); - } - else - { - jobject UpdateTokenInsideOptional; - jbyteArray UpdateTokenInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.updateToken.Value().size())); - env->SetByteArrayRegion(UpdateTokenInsideOptionalByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), - reinterpret_cast(dataResponse.updateToken.Value().data())); - UpdateTokenInsideOptional = UpdateTokenInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(UpdateTokenInsideOptional, UpdateToken); - } - jobject UserConsentNeeded; - if (!dataResponse.userConsentNeeded.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UserConsentNeeded); - } - else - { - jobject UserConsentNeededInsideOptional; - std::string UserConsentNeededInsideOptionalClassName = "java/lang/Boolean"; - std::string UserConsentNeededInsideOptionalCtorSignature = "(Z)V"; - jboolean jniUserConsentNeededInsideOptional = static_cast(dataResponse.userConsentNeeded.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - UserConsentNeededInsideOptionalClassName.c_str(), UserConsentNeededInsideOptionalCtorSignature.c_str(), - jniUserConsentNeededInsideOptional, UserConsentNeededInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(UserConsentNeededInsideOptional, UserConsentNeeded); - } - jobject MetadataForRequestor; - if (!dataResponse.metadataForRequestor.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, MetadataForRequestor); - } - else - { - jobject MetadataForRequestorInsideOptional; - jbyteArray MetadataForRequestorInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.metadataForRequestor.Value().size())); - env->SetByteArrayRegion(MetadataForRequestorInsideOptionalByteArray, 0, - static_cast(dataResponse.metadataForRequestor.Value().size()), - reinterpret_cast(dataResponse.metadataForRequestor.Value().data())); - MetadataForRequestorInsideOptional = MetadataForRequestorInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(MetadataForRequestorInsideOptional, MetadataForRequestor); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, DelayedActionTime, ImageURI, SoftwareVersion, SoftwareVersionString, - UpdateToken, UserConsentNeeded, MetadataForRequestor); -} -CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Action; - std::string ActionClassName = "java/lang/Integer"; - std::string ActionCtorSignature = "(I)V"; - jint jniAction = static_cast(dataResponse.action); - chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), jniAction, - Action); - jobject DelayedActionTime; - std::string DelayedActionTimeClassName = "java/lang/Long"; - std::string DelayedActionTimeCtorSignature = "(J)V"; - jlong jniDelayedActionTime = static_cast(dataResponse.delayedActionTime); - chip::JniReferences::GetInstance().CreateBoxedObject( - DelayedActionTimeClassName.c_str(), DelayedActionTimeCtorSignature.c_str(), jniDelayedActionTime, DelayedActionTime); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Action, DelayedActionTime); -} -CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CHIPGeneralCommissioningClusterArmFailSafeResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::~CHIPGeneralCommissioningClusterArmFailSafeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); -} -CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: - CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: - ~CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); -} -CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: - CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: - ~CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); -} -CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CHIPNetworkCommissioningClusterScanNetworksResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningClusterScanNetworksResponseCallback::~CHIPNetworkCommissioningClusterScanNetworksResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - jobject WiFiScanResults; - if (!dataResponse.wiFiScanResults.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, WiFiScanResults); - } - else - { - jobject WiFiScanResultsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(WiFiScanResultsInsideOptional); - - auto iter_WiFiScanResultsInsideOptional_1 = dataResponse.wiFiScanResults.Value().begin(); - while (iter_WiFiScanResultsInsideOptional_1.Next()) - { - auto & entry_1 = iter_WiFiScanResultsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_security; - std::string newElement_1_securityClassName = "java/lang/Integer"; - std::string newElement_1_securityCtorSignature = "(I)V"; - jint jninewElement_1_security = static_cast(entry_1.security.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), - newElement_1_securityCtorSignature.c_str(), - jninewElement_1_security, newElement_1_security); - jobject newElement_1_ssid; - jbyteArray newElement_1_ssidByteArray = env->NewByteArray(static_cast(entry_1.ssid.size())); - env->SetByteArrayRegion(newElement_1_ssidByteArray, 0, static_cast(entry_1.ssid.size()), - reinterpret_cast(entry_1.ssid.data())); - newElement_1_ssid = newElement_1_ssidByteArray; - jobject newElement_1_bssid; - jbyteArray newElement_1_bssidByteArray = env->NewByteArray(static_cast(entry_1.bssid.size())); - env->SetByteArrayRegion(newElement_1_bssidByteArray, 0, static_cast(entry_1.bssid.size()), - reinterpret_cast(entry_1.bssid.data())); - newElement_1_bssid = newElement_1_bssidByteArray; - jobject newElement_1_channel; - std::string newElement_1_channelClassName = "java/lang/Integer"; - std::string newElement_1_channelCtorSignature = "(I)V"; - jint jninewElement_1_channel = static_cast(entry_1.channel); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - jninewElement_1_channel, newElement_1_channel); - jobject newElement_1_wiFiBand; - std::string newElement_1_wiFiBandClassName = "java/lang/Integer"; - std::string newElement_1_wiFiBandCtorSignature = "(I)V"; - jint jninewElement_1_wiFiBand = static_cast(entry_1.wiFiBand); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_wiFiBandClassName.c_str(), - newElement_1_wiFiBandCtorSignature.c_str(), - jninewElement_1_wiFiBand, newElement_1_wiFiBand); - jobject newElement_1_rssi; - std::string newElement_1_rssiClassName = "java/lang/Integer"; - std::string newElement_1_rssiCtorSignature = "(I)V"; - jint jninewElement_1_rssi = static_cast(entry_1.rssi); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), - newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, - newElement_1_rssi); - - jclass wiFiInterfaceScanResultStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); - return; - } - - jmethodID wiFiInterfaceScanResultStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, wiFiInterfaceScanResultStructStructClass_2, "", - "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &wiFiInterfaceScanResultStructStructCtor_2); - if (err != CHIP_NO_ERROR || wiFiInterfaceScanResultStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); - return; - } - - newElement_1 = env->NewObject(wiFiInterfaceScanResultStructStructClass_2, wiFiInterfaceScanResultStructStructCtor_2, - newElement_1_security, newElement_1_ssid, newElement_1_bssid, newElement_1_channel, - newElement_1_wiFiBand, newElement_1_rssi); - chip::JniReferences::GetInstance().AddToList(WiFiScanResultsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(WiFiScanResultsInsideOptional, WiFiScanResults); - } - jobject ThreadScanResults; - if (!dataResponse.threadScanResults.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ThreadScanResults); - } - else - { - jobject ThreadScanResultsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(ThreadScanResultsInsideOptional); - - auto iter_ThreadScanResultsInsideOptional_1 = dataResponse.threadScanResults.Value().begin(); - while (iter_ThreadScanResultsInsideOptional_1.Next()) - { - auto & entry_1 = iter_ThreadScanResultsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_panId; - std::string newElement_1_panIdClassName = "java/lang/Integer"; - std::string newElement_1_panIdCtorSignature = "(I)V"; - jint jninewElement_1_panId = static_cast(entry_1.panId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_panIdClassName.c_str(), - newElement_1_panIdCtorSignature.c_str(), - jninewElement_1_panId, newElement_1_panId); - jobject newElement_1_extendedPanId; - std::string newElement_1_extendedPanIdClassName = "java/lang/Long"; - std::string newElement_1_extendedPanIdCtorSignature = "(J)V"; - jlong jninewElement_1_extendedPanId = static_cast(entry_1.extendedPanId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), - newElement_1_extendedPanIdCtorSignature.c_str(), - jninewElement_1_extendedPanId, newElement_1_extendedPanId); - jobject newElement_1_networkName; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.networkName, newElement_1_networkName)); - jobject newElement_1_channel; - std::string newElement_1_channelClassName = "java/lang/Integer"; - std::string newElement_1_channelCtorSignature = "(I)V"; - jint jninewElement_1_channel = static_cast(entry_1.channel); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - jninewElement_1_channel, newElement_1_channel); - jobject newElement_1_version; - std::string newElement_1_versionClassName = "java/lang/Integer"; - std::string newElement_1_versionCtorSignature = "(I)V"; - jint jninewElement_1_version = static_cast(entry_1.version); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), - newElement_1_versionCtorSignature.c_str(), - jninewElement_1_version, newElement_1_version); - jobject newElement_1_extendedAddress; - jbyteArray newElement_1_extendedAddressByteArray = - env->NewByteArray(static_cast(entry_1.extendedAddress.size())); - env->SetByteArrayRegion(newElement_1_extendedAddressByteArray, 0, static_cast(entry_1.extendedAddress.size()), - reinterpret_cast(entry_1.extendedAddress.data())); - newElement_1_extendedAddress = newElement_1_extendedAddressByteArray; - jobject newElement_1_rssi; - std::string newElement_1_rssiClassName = "java/lang/Integer"; - std::string newElement_1_rssiCtorSignature = "(I)V"; - jint jninewElement_1_rssi = static_cast(entry_1.rssi); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), - newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, - newElement_1_rssi); - jobject newElement_1_lqi; - std::string newElement_1_lqiClassName = "java/lang/Integer"; - std::string newElement_1_lqiCtorSignature = "(I)V"; - jint jninewElement_1_lqi = static_cast(entry_1.lqi); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), jninewElement_1_lqi, newElement_1_lqi); - - jclass threadInterfaceScanResultStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); - return; - } - - jmethodID threadInterfaceScanResultStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, threadInterfaceScanResultStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/" - "Integer;Ljava/lang/Integer;)V", - &threadInterfaceScanResultStructStructCtor_2); - if (err != CHIP_NO_ERROR || threadInterfaceScanResultStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); - return; - } - - newElement_1 = - env->NewObject(threadInterfaceScanResultStructStructClass_2, threadInterfaceScanResultStructStructCtor_2, - newElement_1_panId, newElement_1_extendedPanId, newElement_1_networkName, newElement_1_channel, - newElement_1_version, newElement_1_extendedAddress, newElement_1_rssi, newElement_1_lqi); - chip::JniReferences::GetInstance().AddToList(ThreadScanResultsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(ThreadScanResultsInsideOptional, ThreadScanResults); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, WiFiScanResults, ThreadScanResults); -} -CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CHIPNetworkCommissioningClusterNetworkConfigResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::~CHIPNetworkCommissioningClusterNetworkConfigResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - jobject NetworkIndex; - if (!dataResponse.networkIndex.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NetworkIndex); - } - else - { - jobject NetworkIndexInsideOptional; - std::string NetworkIndexInsideOptionalClassName = "java/lang/Integer"; - std::string NetworkIndexInsideOptionalCtorSignature = "(I)V"; - jint jniNetworkIndexInsideOptional = static_cast(dataResponse.networkIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(NetworkIndexInsideOptionalClassName.c_str(), - NetworkIndexInsideOptionalCtorSignature.c_str(), - jniNetworkIndexInsideOptional, NetworkIndexInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NetworkIndexInsideOptional, NetworkIndex); - } - jobject ClientIdentity; - if (!dataResponse.clientIdentity.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ClientIdentity); - } - else - { - jobject ClientIdentityInsideOptional; - jbyteArray ClientIdentityInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.clientIdentity.Value().size())); - env->SetByteArrayRegion(ClientIdentityInsideOptionalByteArray, 0, - static_cast(dataResponse.clientIdentity.Value().size()), - reinterpret_cast(dataResponse.clientIdentity.Value().data())); - ClientIdentityInsideOptional = ClientIdentityInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(ClientIdentityInsideOptional, ClientIdentity); - } - jobject PossessionSignature; - if (!dataResponse.possessionSignature.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); - } - else - { - jobject PossessionSignatureInsideOptional; - jbyteArray PossessionSignatureInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); - env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, - static_cast(dataResponse.possessionSignature.Value().size()), - reinterpret_cast(dataResponse.possessionSignature.Value().data())); - PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, NetworkIndex, ClientIdentity, - PossessionSignature); -} -CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CHIPNetworkCommissioningClusterConnectNetworkResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::~CHIPNetworkCommissioningClusterConnectNetworkResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - jobject ErrorValue; - if (dataResponse.errorValue.IsNull()) - { - ErrorValue = nullptr; - } - else - { - std::string ErrorValueClassName = "java/lang/Long"; - std::string ErrorValueCtorSignature = "(J)V"; - jlong jniErrorValue = static_cast(dataResponse.errorValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), - jniErrorValue, ErrorValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, ErrorValue); -} -CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CHIPNetworkCommissioningClusterQueryIdentityResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([BLjava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Identity; - jbyteArray IdentityByteArray = env->NewByteArray(static_cast(dataResponse.identity.size())); - env->SetByteArrayRegion(IdentityByteArray, 0, static_cast(dataResponse.identity.size()), - reinterpret_cast(dataResponse.identity.data())); - Identity = IdentityByteArray; - jobject PossessionSignature; - if (!dataResponse.possessionSignature.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); - } - else - { - jobject PossessionSignatureInsideOptional; - jbyteArray PossessionSignatureInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); - env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, - static_cast(dataResponse.possessionSignature.Value().size()), - reinterpret_cast(dataResponse.possessionSignature.Value().data())); - PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Identity, PossessionSignature); -} -CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::~CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;[BLjava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject LogContent; - jbyteArray LogContentByteArray = env->NewByteArray(static_cast(dataResponse.logContent.size())); - env->SetByteArrayRegion(LogContentByteArray, 0, static_cast(dataResponse.logContent.size()), - reinterpret_cast(dataResponse.logContent.data())); - LogContent = LogContentByteArray; - jobject UTCTimeStamp; - if (!dataResponse.UTCTimeStamp.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UTCTimeStamp); - } - else - { - jobject UTCTimeStampInsideOptional; - std::string UTCTimeStampInsideOptionalClassName = "java/lang/Long"; - std::string UTCTimeStampInsideOptionalCtorSignature = "(J)V"; - jlong jniUTCTimeStampInsideOptional = static_cast(dataResponse.UTCTimeStamp.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UTCTimeStampInsideOptionalClassName.c_str(), - UTCTimeStampInsideOptionalCtorSignature.c_str(), - jniUTCTimeStampInsideOptional, UTCTimeStampInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(UTCTimeStampInsideOptional, UTCTimeStamp); - } - jobject TimeSinceBoot; - if (!dataResponse.timeSinceBoot.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, TimeSinceBoot); - } - else - { - jobject TimeSinceBootInsideOptional; - std::string TimeSinceBootInsideOptionalClassName = "java/lang/Long"; - std::string TimeSinceBootInsideOptionalCtorSignature = "(J)V"; - jlong jniTimeSinceBootInsideOptional = static_cast(dataResponse.timeSinceBoot.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(TimeSinceBootInsideOptionalClassName.c_str(), - TimeSinceBootInsideOptionalCtorSignature.c_str(), - jniTimeSinceBootInsideOptional, TimeSinceBootInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(TimeSinceBootInsideOptional, TimeSinceBoot); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, LogContent, UTCTimeStamp, TimeSinceBoot); -} -CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::~CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;Ljava/lang/Long;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject SystemTimeMs; - std::string SystemTimeMsClassName = "java/lang/Long"; - std::string SystemTimeMsCtorSignature = "(J)V"; - jlong jniSystemTimeMs = static_cast(dataResponse.systemTimeMs); - chip::JniReferences::GetInstance().CreateBoxedObject(SystemTimeMsClassName.c_str(), SystemTimeMsCtorSignature.c_str(), - jniSystemTimeMs, SystemTimeMs); - jobject PosixTimeMs; - if (dataResponse.posixTimeMs.IsNull()) - { - PosixTimeMs = nullptr; - } - else - { - std::string PosixTimeMsClassName = "java/lang/Long"; - std::string PosixTimeMsCtorSignature = "(J)V"; - jlong jniPosixTimeMs = static_cast(dataResponse.posixTimeMs.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(PosixTimeMsClassName.c_str(), PosixTimeMsCtorSignature.c_str(), - jniPosixTimeMs, PosixTimeMs); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, SystemTimeMs, PosixTimeMs); -} -CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject DSTOffsetRequired; - std::string DSTOffsetRequiredClassName = "java/lang/Boolean"; - std::string DSTOffsetRequiredCtorSignature = "(Z)V"; - jboolean jniDSTOffsetRequired = static_cast(dataResponse.DSTOffsetRequired); - chip::JniReferences::GetInstance().CreateBoxedObject( - DSTOffsetRequiredClassName.c_str(), DSTOffsetRequiredCtorSignature.c_str(), jniDSTOffsetRequired, DSTOffsetRequired); - - env->CallVoidMethod(javaCallbackRef, javaMethod, DSTOffsetRequired); -} -CHIPOperationalCredentialsClusterAttestationResponseCallback::CHIPOperationalCredentialsClusterAttestationResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsClusterAttestationResponseCallback::~CHIPOperationalCredentialsClusterAttestationResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject AttestationElements; - jbyteArray AttestationElementsByteArray = env->NewByteArray(static_cast(dataResponse.attestationElements.size())); - env->SetByteArrayRegion(AttestationElementsByteArray, 0, static_cast(dataResponse.attestationElements.size()), - reinterpret_cast(dataResponse.attestationElements.data())); - AttestationElements = AttestationElementsByteArray; - jobject AttestationSignature; - jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); - env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), - reinterpret_cast(dataResponse.attestationSignature.data())); - AttestationSignature = AttestationSignatureByteArray; - - env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, AttestationSignature); -} -CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: - CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: - ~CHIPOperationalCredentialsClusterCertificateChainResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Certificate; - jbyteArray CertificateByteArray = env->NewByteArray(static_cast(dataResponse.certificate.size())); - env->SetByteArrayRegion(CertificateByteArray, 0, static_cast(dataResponse.certificate.size()), - reinterpret_cast(dataResponse.certificate.data())); - Certificate = CertificateByteArray; - - env->CallVoidMethod(javaCallbackRef, javaMethod, Certificate); -} -CHIPOperationalCredentialsClusterCSRResponseCallback::CHIPOperationalCredentialsClusterCSRResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsClusterCSRResponseCallback::~CHIPOperationalCredentialsClusterCSRResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOperationalCredentialsClusterCSRResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NOCSRElements; - jbyteArray NOCSRElementsByteArray = env->NewByteArray(static_cast(dataResponse.NOCSRElements.size())); - env->SetByteArrayRegion(NOCSRElementsByteArray, 0, static_cast(dataResponse.NOCSRElements.size()), - reinterpret_cast(dataResponse.NOCSRElements.data())); - NOCSRElements = NOCSRElementsByteArray; - jobject AttestationSignature; - jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); - env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), - reinterpret_cast(dataResponse.attestationSignature.data())); - AttestationSignature = AttestationSignatureByteArray; - - env->CallVoidMethod(javaCallbackRef, javaMethod, NOCSRElements, AttestationSignature); -} -CHIPOperationalCredentialsClusterNOCResponseCallback::CHIPOperationalCredentialsClusterNOCResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsClusterNOCResponseCallback::~CHIPOperationalCredentialsClusterNOCResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject StatusCode; - std::string StatusCodeClassName = "java/lang/Integer"; - std::string StatusCodeCtorSignature = "(I)V"; - jint jniStatusCode = static_cast(dataResponse.statusCode); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), - jniStatusCode, StatusCode); - jobject FabricIndex; - if (!dataResponse.fabricIndex.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, FabricIndex); - } - else - { - jobject FabricIndexInsideOptional; - std::string FabricIndexInsideOptionalClassName = "java/lang/Integer"; - std::string FabricIndexInsideOptionalCtorSignature = "(I)V"; - jint jniFabricIndexInsideOptional = static_cast(dataResponse.fabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexInsideOptionalClassName.c_str(), - FabricIndexInsideOptionalCtorSignature.c_str(), - jniFabricIndexInsideOptional, FabricIndexInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(FabricIndexInsideOptional, FabricIndex); - } - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, StatusCode, FabricIndex, DebugText); -} -CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CHIPGroupKeyManagementClusterKeySetReadResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementClusterKeySetReadResponseCallback::~CHIPGroupKeyManagementClusterKeySetReadResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject GroupKeySet; - jobject GroupKeySet_groupKeySetID; - std::string GroupKeySet_groupKeySetIDClassName = "java/lang/Integer"; - std::string GroupKeySet_groupKeySetIDCtorSignature = "(I)V"; - jint jniGroupKeySet_groupKeySetID = static_cast(dataResponse.groupKeySet.groupKeySetID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_groupKeySetIDClassName.c_str(), - GroupKeySet_groupKeySetIDCtorSignature.c_str(), - jniGroupKeySet_groupKeySetID, GroupKeySet_groupKeySetID); - jobject GroupKeySet_groupKeySecurityPolicy; - std::string GroupKeySet_groupKeySecurityPolicyClassName = "java/lang/Integer"; - std::string GroupKeySet_groupKeySecurityPolicyCtorSignature = "(I)V"; - jint jniGroupKeySet_groupKeySecurityPolicy = static_cast(dataResponse.groupKeySet.groupKeySecurityPolicy); - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_groupKeySecurityPolicyClassName.c_str(), GroupKeySet_groupKeySecurityPolicyCtorSignature.c_str(), - jniGroupKeySet_groupKeySecurityPolicy, GroupKeySet_groupKeySecurityPolicy); - jobject GroupKeySet_epochKey0; - if (dataResponse.groupKeySet.epochKey0.IsNull()) - { - GroupKeySet_epochKey0 = nullptr; - } - else - { - jbyteArray GroupKeySet_epochKey0ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey0.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey0ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey0.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey0.Value().data())); - GroupKeySet_epochKey0 = GroupKeySet_epochKey0ByteArray; - } - jobject GroupKeySet_epochStartTime0; - if (dataResponse.groupKeySet.epochStartTime0.IsNull()) - { - GroupKeySet_epochStartTime0 = nullptr; - } - else - { - std::string GroupKeySet_epochStartTime0ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime0CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime0 = static_cast(dataResponse.groupKeySet.epochStartTime0.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime0ClassName.c_str(), - GroupKeySet_epochStartTime0CtorSignature.c_str(), - jniGroupKeySet_epochStartTime0, GroupKeySet_epochStartTime0); - } - jobject GroupKeySet_epochKey1; - if (dataResponse.groupKeySet.epochKey1.IsNull()) - { - GroupKeySet_epochKey1 = nullptr; - } - else - { - jbyteArray GroupKeySet_epochKey1ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey1.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey1ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey1.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey1.Value().data())); - GroupKeySet_epochKey1 = GroupKeySet_epochKey1ByteArray; - } - jobject GroupKeySet_epochStartTime1; - if (dataResponse.groupKeySet.epochStartTime1.IsNull()) - { - GroupKeySet_epochStartTime1 = nullptr; - } - else - { - std::string GroupKeySet_epochStartTime1ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime1CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime1 = static_cast(dataResponse.groupKeySet.epochStartTime1.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime1ClassName.c_str(), - GroupKeySet_epochStartTime1CtorSignature.c_str(), - jniGroupKeySet_epochStartTime1, GroupKeySet_epochStartTime1); - } - jobject GroupKeySet_epochKey2; - if (dataResponse.groupKeySet.epochKey2.IsNull()) - { - GroupKeySet_epochKey2 = nullptr; - } - else - { - jbyteArray GroupKeySet_epochKey2ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey2.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey2ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey2.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey2.Value().data())); - GroupKeySet_epochKey2 = GroupKeySet_epochKey2ByteArray; - } - jobject GroupKeySet_epochStartTime2; - if (dataResponse.groupKeySet.epochStartTime2.IsNull()) - { - GroupKeySet_epochStartTime2 = nullptr; - } - else - { - std::string GroupKeySet_epochStartTime2ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime2CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime2 = static_cast(dataResponse.groupKeySet.epochStartTime2.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime2ClassName.c_str(), - GroupKeySet_epochStartTime2CtorSignature.c_str(), - jniGroupKeySet_epochStartTime2, GroupKeySet_epochStartTime2); - } - - jclass groupKeySetStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct", groupKeySetStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeySetStruct"); - return; - } - - jmethodID groupKeySetStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, groupKeySetStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;[BLjava/lang/Long;[BLjava/lang/Long;)V", - &groupKeySetStructStructCtor_0); - if (err != CHIP_NO_ERROR || groupKeySetStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeySetStruct constructor"); - return; - } - - GroupKeySet = - env->NewObject(groupKeySetStructStructClass_0, groupKeySetStructStructCtor_0, GroupKeySet_groupKeySetID, - GroupKeySet_groupKeySecurityPolicy, GroupKeySet_epochKey0, GroupKeySet_epochStartTime0, - GroupKeySet_epochKey1, GroupKeySet_epochStartTime1, GroupKeySet_epochKey2, GroupKeySet_epochStartTime2); - - env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySet); -} -CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: - CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: - ~CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject GroupKeySetIDs; - chip::JniReferences::GetInstance().CreateArrayList(GroupKeySetIDs); - - auto iter_GroupKeySetIDs_0 = dataResponse.groupKeySetIDs.begin(); - while (iter_GroupKeySetIDs_0.Next()) - { - auto & entry_0 = iter_GroupKeySetIDs_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(GroupKeySetIDs, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySetIDs); -} -CHIPIcdManagementClusterRegisterClientResponseCallback::CHIPIcdManagementClusterRegisterClientResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementClusterRegisterClientResponseCallback::~CHIPIcdManagementClusterRegisterClientResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject ICDCounter; - std::string ICDCounterClassName = "java/lang/Long"; - std::string ICDCounterCtorSignature = "(J)V"; - jlong jniICDCounter = static_cast(dataResponse.ICDCounter); - chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), - jniICDCounter, ICDCounter); - - env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); -} -CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementClusterStayActiveResponseCallback::~CHIPIcdManagementClusterStayActiveResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPIcdManagementClusterStayActiveResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject PromisedActiveDuration; - std::string PromisedActiveDurationClassName = "java/lang/Long"; - std::string PromisedActiveDurationCtorSignature = "(J)V"; - jlong jniPromisedActiveDuration = static_cast(dataResponse.promisedActiveDuration); - chip::JniReferences::GetInstance().CreateBoxedObject(PromisedActiveDurationClassName.c_str(), - PromisedActiveDurationCtorSignature.c_str(), - jniPromisedActiveDuration, PromisedActiveDuration); - - env->CallVoidMethod(javaCallbackRef, javaMethod, PromisedActiveDuration); -} -CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: - CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: - ~CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Lchip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject CommandResponseState; - jobject CommandResponseState_errorStateID; - std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; - std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); - jobject CommandResponseState_errorStateLabel; - if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); - } - else - { - jobject CommandResponseState_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, - CommandResponseState_errorStateLabel); - } - jobject CommandResponseState_errorStateDetails; - if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); - } - else - { - jobject CommandResponseState_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, - CommandResponseState_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); - return; - } - - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); - return; - } - - CommandResponseState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, - CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); - - env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); -} -CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeClusterChangeToModeResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeClusterChangeToModeResponseCallback::~CHIPLaundryWasherModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & - dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPRvcRunModeClusterChangeToModeResponseCallback::CHIPRvcRunModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeClusterChangeToModeResponseCallback::~CHIPRvcRunModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPRvcCleanModeClusterChangeToModeResponseCallback::CHIPRvcCleanModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeClusterChangeToModeResponseCallback::~CHIPRvcCleanModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPDishwasherModeClusterChangeToModeResponseCallback::CHIPDishwasherModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeClusterChangeToModeResponseCallback::~CHIPDishwasherModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPOperationalStateClusterOperationalCommandResponseCallback::CHIPOperationalStateClusterOperationalCommandResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateClusterOperationalCommandResponseCallback::~CHIPOperationalStateClusterOperationalCommandResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Lchip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject CommandResponseState; - jobject CommandResponseState_errorStateID; - std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; - std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); - jobject CommandResponseState_errorStateLabel; - if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); - } - else - { - jobject CommandResponseState_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, - CommandResponseState_errorStateLabel); - } - jobject CommandResponseState_errorStateDetails; - if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); - } - else - { - jobject CommandResponseState_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, - CommandResponseState_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); - return; - } - - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); - return; - } - - CommandResponseState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, - CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); - - env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); -} -CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CHIPRvcOperationalStateClusterOperationalCommandResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateClusterOperationalCommandResponseCallback:: - ~CHIPRvcOperationalStateClusterOperationalCommandResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject CommandResponseState; - jobject CommandResponseState_errorStateID; - std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; - std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); - jobject CommandResponseState_errorStateLabel; - if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); - } - else - { - jobject CommandResponseState_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, - CommandResponseState_errorStateLabel); - } - jobject CommandResponseState_errorStateDetails; - if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); - } - else - { - jobject CommandResponseState_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, - CommandResponseState_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); - return; - } - - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); - return; - } - - CommandResponseState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, - CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); - - env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); -} -CHIPScenesManagementClusterAddSceneResponseCallback::CHIPScenesManagementClusterAddSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterAddSceneResponseCallback::~CHIPScenesManagementClusterAddSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterAddSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); -} -CHIPScenesManagementClusterViewSceneResponseCallback::CHIPScenesManagementClusterViewSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterViewSceneResponseCallback::~CHIPScenesManagementClusterViewSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterViewSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - jobject TransitionTime; - if (!dataResponse.transitionTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); - } - else - { - jobject TransitionTimeInsideOptional; - std::string TransitionTimeInsideOptionalClassName = "java/lang/Long"; - std::string TransitionTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), - TransitionTimeInsideOptionalCtorSignature.c_str(), - jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); - } - jobject SceneName; - if (!dataResponse.sceneName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); - } - else - { - jobject SceneNameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.sceneName.Value(), SceneNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); - } - jobject ExtensionFieldSets; - if (!dataResponse.extensionFieldSets.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); - } - else - { - jobject ExtensionFieldSetsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); - - auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); - while (iter_ExtensionFieldSetsInsideOptional_1.Next()) - { - auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_clusterID; - std::string newElement_1_clusterIDClassName = "java/lang/Long"; - std::string newElement_1_clusterIDCtorSignature = "(J)V"; - jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), - newElement_1_clusterIDCtorSignature.c_str(), - jninewElement_1_clusterID, newElement_1_clusterID); - jobject newElement_1_attributeValueList; - chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); - - auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); - while (iter_newElement_1_attributeValueList_3.Next()) - { - auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); - jobject newElement_3; - jobject newElement_3_attributeID; - std::string newElement_3_attributeIDClassName = "java/lang/Long"; - std::string newElement_3_attributeIDCtorSignature = "(J)V"; - jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), - newElement_3_attributeIDCtorSignature.c_str(), - jninewElement_3_attributeID, newElement_3_attributeID); - jobject newElement_3_attributeValue; - std::string newElement_3_attributeValueClassName = "java/lang/Long"; - std::string newElement_3_attributeValueCtorSignature = "(J)V"; - jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), - jninewElement_3_attributeValue, newElement_3_attributeValue); - - jclass attributeValuePairStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterAttributeValuePair", - attributeValuePairStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterAttributeValuePair"); - return; - } - - jmethodID attributeValuePairStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, attributeValuePairStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &attributeValuePairStructCtor_4); - if (err != CHIP_NO_ERROR || attributeValuePairStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterAttributeValuePair constructor"); - return; - } - - newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, - newElement_3_attributeID, newElement_3_attributeValue); - chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); - } - - jclass extensionFieldSetStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterExtensionFieldSet", extensionFieldSetStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterExtensionFieldSet"); - return; - } - - jmethodID extensionFieldSetStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, extensionFieldSetStructClass_2, "", - "(Ljava/lang/Long;Ljava/util/ArrayList;)V", - &extensionFieldSetStructCtor_2); - if (err != CHIP_NO_ERROR || extensionFieldSetStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterExtensionFieldSet constructor"); - return; - } - - newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, - newElement_1_attributeValueList); - chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); -} -CHIPScenesManagementClusterRemoveSceneResponseCallback::CHIPScenesManagementClusterRemoveSceneResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterRemoveSceneResponseCallback::~CHIPScenesManagementClusterRemoveSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterRemoveSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); -} -CHIPScenesManagementClusterRemoveAllScenesResponseCallback::CHIPScenesManagementClusterRemoveAllScenesResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterRemoveAllScenesResponseCallback::~CHIPScenesManagementClusterRemoveAllScenesResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterRemoveAllScenesResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); -} -CHIPScenesManagementClusterStoreSceneResponseCallback::CHIPScenesManagementClusterStoreSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterStoreSceneResponseCallback::~CHIPScenesManagementClusterStoreSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterStoreSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); -} -CHIPScenesManagementClusterGetSceneMembershipResponseCallback::CHIPScenesManagementClusterGetSceneMembershipResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterGetSceneMembershipResponseCallback::~CHIPScenesManagementClusterGetSceneMembershipResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterGetSceneMembershipResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Capacity; - if (dataResponse.capacity.IsNull()) - { - Capacity = nullptr; - } - else - { - std::string CapacityClassName = "java/lang/Integer"; - std::string CapacityCtorSignature = "(I)V"; - jint jniCapacity = static_cast(dataResponse.capacity.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), - jniCapacity, Capacity); - } - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneList; - if (!dataResponse.sceneList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneList); - } - else - { - jobject SceneListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(SceneListInsideOptional); - - auto iter_SceneListInsideOptional_1 = dataResponse.sceneList.Value().begin(); - while (iter_SceneListInsideOptional_1.Next()) - { - auto & entry_1 = iter_SceneListInsideOptional_1.GetValue(); - jobject newElement_1; - std::string newElement_1ClassName = "java/lang/Integer"; - std::string newElement_1CtorSignature = "(I)V"; - jint jninewElement_1 = static_cast(entry_1); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); - chip::JniReferences::GetInstance().AddToList(SceneListInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(SceneListInsideOptional, SceneList); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupID, SceneList); -} -CHIPScenesManagementClusterCopySceneResponseCallback::CHIPScenesManagementClusterCopySceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementClusterCopySceneResponseCallback::~CHIPScenesManagementClusterCopySceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesManagementClusterCopySceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupIdentifierFrom; - std::string GroupIdentifierFromClassName = "java/lang/Integer"; - std::string GroupIdentifierFromCtorSignature = "(I)V"; - jint jniGroupIdentifierFrom = static_cast(dataResponse.groupIdentifierFrom); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), - GroupIdentifierFromCtorSignature.c_str(), jniGroupIdentifierFrom, - GroupIdentifierFrom); - jobject SceneIdentifierFrom; - std::string SceneIdentifierFromClassName = "java/lang/Integer"; - std::string SceneIdentifierFromCtorSignature = "(I)V"; - jint jniSceneIdentifierFrom = static_cast(dataResponse.sceneIdentifierFrom); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), - SceneIdentifierFromCtorSignature.c_str(), jniSceneIdentifierFrom, - SceneIdentifierFrom); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupIdentifierFrom, SceneIdentifierFrom); -} -CHIPEnergyEvseClusterGetTargetsResponseCallback::CHIPEnergyEvseClusterGetTargetsResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseClusterGetTargetsResponseCallback::~CHIPEnergyEvseClusterGetTargetsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPEnergyEvseClusterGetTargetsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject ChargingTargetSchedules; - chip::JniReferences::GetInstance().CreateArrayList(ChargingTargetSchedules); - - auto iter_ChargingTargetSchedules_0 = dataResponse.chargingTargetSchedules.begin(); - while (iter_ChargingTargetSchedules_0.Next()) - { - auto & entry_0 = iter_ChargingTargetSchedules_0.GetValue(); - jobject newElement_0; - jobject newElement_0_dayOfWeekForSequence; - std::string newElement_0_dayOfWeekForSequenceClassName = "java/lang/Integer"; - std::string newElement_0_dayOfWeekForSequenceCtorSignature = "(I)V"; - jint jninewElement_0_dayOfWeekForSequence = static_cast(entry_0.dayOfWeekForSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_dayOfWeekForSequenceClassName.c_str(), newElement_0_dayOfWeekForSequenceCtorSignature.c_str(), - jninewElement_0_dayOfWeekForSequence, newElement_0_dayOfWeekForSequence); - jobject newElement_0_chargingTargets; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_chargingTargets); - - auto iter_newElement_0_chargingTargets_2 = entry_0.chargingTargets.begin(); - while (iter_newElement_0_chargingTargets_2.Next()) - { - auto & entry_2 = iter_newElement_0_chargingTargets_2.GetValue(); - jobject newElement_2; - jobject newElement_2_targetTimeMinutesPastMidnight; - std::string newElement_2_targetTimeMinutesPastMidnightClassName = "java/lang/Integer"; - std::string newElement_2_targetTimeMinutesPastMidnightCtorSignature = "(I)V"; - jint jninewElement_2_targetTimeMinutesPastMidnight = static_cast(entry_2.targetTimeMinutesPastMidnight); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_targetTimeMinutesPastMidnightClassName.c_str(), - newElement_2_targetTimeMinutesPastMidnightCtorSignature.c_str(), jninewElement_2_targetTimeMinutesPastMidnight, - newElement_2_targetTimeMinutesPastMidnight); - jobject newElement_2_targetSoC; - if (!entry_2.targetSoC.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_targetSoC); - } - else - { - jobject newElement_2_targetSoCInsideOptional; - std::string newElement_2_targetSoCInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_targetSoCInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_targetSoCInsideOptional = static_cast(entry_2.targetSoC.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_targetSoCInsideOptionalClassName.c_str(), - newElement_2_targetSoCInsideOptionalCtorSignature.c_str(), jninewElement_2_targetSoCInsideOptional, - newElement_2_targetSoCInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_targetSoCInsideOptional, newElement_2_targetSoC); - } - jobject newElement_2_addedEnergy; - if (!entry_2.addedEnergy.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_addedEnergy); - } - else - { - jobject newElement_2_addedEnergyInsideOptional; - std::string newElement_2_addedEnergyInsideOptionalClassName = "java/lang/Long"; - std::string newElement_2_addedEnergyInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_2_addedEnergyInsideOptional = static_cast(entry_2.addedEnergy.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_addedEnergyInsideOptionalClassName.c_str(), - newElement_2_addedEnergyInsideOptionalCtorSignature.c_str(), jninewElement_2_addedEnergyInsideOptional, - newElement_2_addedEnergyInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_addedEnergyInsideOptional, newElement_2_addedEnergy); - } - - jclass chargingTargetStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct"); - return; - } - - jmethodID chargingTargetStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &chargingTargetStructStructCtor_3); - if (err != CHIP_NO_ERROR || chargingTargetStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(chargingTargetStructStructClass_3, chargingTargetStructStructCtor_3, - newElement_2_targetTimeMinutesPastMidnight, newElement_2_targetSoC, newElement_2_addedEnergy); - chip::JniReferences::GetInstance().AddToList(newElement_0_chargingTargets, newElement_2); - } - - jclass chargingTargetScheduleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct", - chargingTargetScheduleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct"); - return; - } - - jmethodID chargingTargetScheduleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetScheduleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &chargingTargetScheduleStructStructCtor_1); - if (err != CHIP_NO_ERROR || chargingTargetScheduleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct constructor"); - return; - } - - newElement_0 = env->NewObject(chargingTargetScheduleStructStructClass_1, chargingTargetScheduleStructStructCtor_1, - newElement_0_dayOfWeekForSequence, newElement_0_chargingTargets); - chip::JniReferences::GetInstance().AddToList(ChargingTargetSchedules, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, ChargingTargetSchedules); -} -CHIPEnergyEvseModeClusterChangeToModeResponseCallback::CHIPEnergyEvseModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeClusterChangeToModeResponseCallback::~CHIPEnergyEvseModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPEnergyEvseModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback:: - CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback:: - ~CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); -} -CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::~CHIPDoorLockClusterGetWeekDayScheduleResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject WeekDayIndex; - std::string WeekDayIndexClassName = "java/lang/Integer"; - std::string WeekDayIndexCtorSignature = "(I)V"; - jint jniWeekDayIndex = static_cast(dataResponse.weekDayIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(WeekDayIndexClassName.c_str(), WeekDayIndexCtorSignature.c_str(), - jniWeekDayIndex, WeekDayIndex); - jobject UserIndex; - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - jint jniUserIndex = static_cast(dataResponse.userIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - jniUserIndex, UserIndex); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject DaysMask; - if (!dataResponse.daysMask.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DaysMask); - } - else - { - jobject DaysMaskInsideOptional; - std::string DaysMaskInsideOptionalClassName = "java/lang/Integer"; - std::string DaysMaskInsideOptionalCtorSignature = "(I)V"; - jint jniDaysMaskInsideOptional = static_cast(dataResponse.daysMask.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(DaysMaskInsideOptionalClassName.c_str(), - DaysMaskInsideOptionalCtorSignature.c_str(), - jniDaysMaskInsideOptional, DaysMaskInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(DaysMaskInsideOptional, DaysMask); - } - jobject StartHour; - if (!dataResponse.startHour.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StartHour); - } - else - { - jobject StartHourInsideOptional; - std::string StartHourInsideOptionalClassName = "java/lang/Integer"; - std::string StartHourInsideOptionalCtorSignature = "(I)V"; - jint jniStartHourInsideOptional = static_cast(dataResponse.startHour.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(StartHourInsideOptionalClassName.c_str(), - StartHourInsideOptionalCtorSignature.c_str(), - jniStartHourInsideOptional, StartHourInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(StartHourInsideOptional, StartHour); - } - jobject StartMinute; - if (!dataResponse.startMinute.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StartMinute); - } - else - { - jobject StartMinuteInsideOptional; - std::string StartMinuteInsideOptionalClassName = "java/lang/Integer"; - std::string StartMinuteInsideOptionalCtorSignature = "(I)V"; - jint jniStartMinuteInsideOptional = static_cast(dataResponse.startMinute.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(StartMinuteInsideOptionalClassName.c_str(), - StartMinuteInsideOptionalCtorSignature.c_str(), - jniStartMinuteInsideOptional, StartMinuteInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(StartMinuteInsideOptional, StartMinute); - } - jobject EndHour; - if (!dataResponse.endHour.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, EndHour); - } - else - { - jobject EndHourInsideOptional; - std::string EndHourInsideOptionalClassName = "java/lang/Integer"; - std::string EndHourInsideOptionalCtorSignature = "(I)V"; - jint jniEndHourInsideOptional = static_cast(dataResponse.endHour.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(EndHourInsideOptionalClassName.c_str(), - EndHourInsideOptionalCtorSignature.c_str(), - jniEndHourInsideOptional, EndHourInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(EndHourInsideOptional, EndHour); - } - jobject EndMinute; - if (!dataResponse.endMinute.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, EndMinute); - } - else - { - jobject EndMinuteInsideOptional; - std::string EndMinuteInsideOptionalClassName = "java/lang/Integer"; - std::string EndMinuteInsideOptionalCtorSignature = "(I)V"; - jint jniEndMinuteInsideOptional = static_cast(dataResponse.endMinute.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(EndMinuteInsideOptionalClassName.c_str(), - EndMinuteInsideOptionalCtorSignature.c_str(), - jniEndMinuteInsideOptional, EndMinuteInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(EndMinuteInsideOptional, EndMinute); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, WeekDayIndex, UserIndex, Status, DaysMask, StartHour, StartMinute, EndHour, - EndMinute); -} -CHIPDoorLockClusterGetYearDayScheduleResponseCallback::CHIPDoorLockClusterGetYearDayScheduleResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterGetYearDayScheduleResponseCallback::~CHIPDoorLockClusterGetYearDayScheduleResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterGetYearDayScheduleResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject YearDayIndex; - std::string YearDayIndexClassName = "java/lang/Integer"; - std::string YearDayIndexCtorSignature = "(I)V"; - jint jniYearDayIndex = static_cast(dataResponse.yearDayIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(YearDayIndexClassName.c_str(), YearDayIndexCtorSignature.c_str(), - jniYearDayIndex, YearDayIndex); - jobject UserIndex; - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - jint jniUserIndex = static_cast(dataResponse.userIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - jniUserIndex, UserIndex); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject LocalStartTime; - if (!dataResponse.localStartTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, LocalStartTime); - } - else - { - jobject LocalStartTimeInsideOptional; - std::string LocalStartTimeInsideOptionalClassName = "java/lang/Long"; - std::string LocalStartTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniLocalStartTimeInsideOptional = static_cast(dataResponse.localStartTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LocalStartTimeInsideOptionalClassName.c_str(), - LocalStartTimeInsideOptionalCtorSignature.c_str(), - jniLocalStartTimeInsideOptional, LocalStartTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(LocalStartTimeInsideOptional, LocalStartTime); - } - jobject LocalEndTime; - if (!dataResponse.localEndTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, LocalEndTime); - } - else - { - jobject LocalEndTimeInsideOptional; - std::string LocalEndTimeInsideOptionalClassName = "java/lang/Long"; - std::string LocalEndTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniLocalEndTimeInsideOptional = static_cast(dataResponse.localEndTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LocalEndTimeInsideOptionalClassName.c_str(), - LocalEndTimeInsideOptionalCtorSignature.c_str(), - jniLocalEndTimeInsideOptional, LocalEndTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(LocalEndTimeInsideOptional, LocalEndTime); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, YearDayIndex, UserIndex, Status, LocalStartTime, LocalEndTime); -} -CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CHIPDoorLockClusterGetHolidayScheduleResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterGetHolidayScheduleResponseCallback::~CHIPDoorLockClusterGetHolidayScheduleResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject HolidayIndex; - std::string HolidayIndexClassName = "java/lang/Integer"; - std::string HolidayIndexCtorSignature = "(I)V"; - jint jniHolidayIndex = static_cast(dataResponse.holidayIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(HolidayIndexClassName.c_str(), HolidayIndexCtorSignature.c_str(), - jniHolidayIndex, HolidayIndex); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject LocalStartTime; - if (!dataResponse.localStartTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, LocalStartTime); - } - else - { - jobject LocalStartTimeInsideOptional; - std::string LocalStartTimeInsideOptionalClassName = "java/lang/Long"; - std::string LocalStartTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniLocalStartTimeInsideOptional = static_cast(dataResponse.localStartTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LocalStartTimeInsideOptionalClassName.c_str(), - LocalStartTimeInsideOptionalCtorSignature.c_str(), - jniLocalStartTimeInsideOptional, LocalStartTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(LocalStartTimeInsideOptional, LocalStartTime); - } - jobject LocalEndTime; - if (!dataResponse.localEndTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, LocalEndTime); - } - else - { - jobject LocalEndTimeInsideOptional; - std::string LocalEndTimeInsideOptionalClassName = "java/lang/Long"; - std::string LocalEndTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniLocalEndTimeInsideOptional = static_cast(dataResponse.localEndTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LocalEndTimeInsideOptionalClassName.c_str(), - LocalEndTimeInsideOptionalCtorSignature.c_str(), - jniLocalEndTimeInsideOptional, LocalEndTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(LocalEndTimeInsideOptional, LocalEndTime); - } - jobject OperatingMode; - if (!dataResponse.operatingMode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, OperatingMode); - } - else - { - jobject OperatingModeInsideOptional; - std::string OperatingModeInsideOptionalClassName = "java/lang/Integer"; - std::string OperatingModeInsideOptionalCtorSignature = "(I)V"; - jint jniOperatingModeInsideOptional = static_cast(dataResponse.operatingMode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(OperatingModeInsideOptionalClassName.c_str(), - OperatingModeInsideOptionalCtorSignature.c_str(), - jniOperatingModeInsideOptional, OperatingModeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(OperatingModeInsideOptional, OperatingMode); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, HolidayIndex, Status, LocalStartTime, LocalEndTime, OperatingMode); -} -CHIPDoorLockClusterGetUserResponseCallback::CHIPDoorLockClusterGetUserResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterGetUserResponseCallback::~CHIPDoorLockClusterGetUserResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/" - "ArrayList;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject UserIndex; - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - jint jniUserIndex = static_cast(dataResponse.userIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - jniUserIndex, UserIndex); - jobject UserName; - if (dataResponse.userName.IsNull()) - { - UserName = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.userName.Value(), UserName)); - } - jobject UserUniqueID; - if (dataResponse.userUniqueID.IsNull()) - { - UserUniqueID = nullptr; - } - else - { - std::string UserUniqueIDClassName = "java/lang/Long"; - std::string UserUniqueIDCtorSignature = "(J)V"; - jlong jniUserUniqueID = static_cast(dataResponse.userUniqueID.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - UserUniqueIDClassName.c_str(), UserUniqueIDCtorSignature.c_str(), jniUserUniqueID, UserUniqueID); - } - jobject UserStatus; - if (dataResponse.userStatus.IsNull()) - { - UserStatus = nullptr; - } - else - { - std::string UserStatusClassName = "java/lang/Integer"; - std::string UserStatusCtorSignature = "(I)V"; - jint jniUserStatus = static_cast(dataResponse.userStatus.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UserStatusClassName.c_str(), UserStatusCtorSignature.c_str(), - jniUserStatus, UserStatus); - } - jobject UserType; - if (dataResponse.userType.IsNull()) - { - UserType = nullptr; - } - else - { - std::string UserTypeClassName = "java/lang/Integer"; - std::string UserTypeCtorSignature = "(I)V"; - jint jniUserType = static_cast(dataResponse.userType.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UserTypeClassName.c_str(), UserTypeCtorSignature.c_str(), - jniUserType, UserType); - } - jobject CredentialRule; - if (dataResponse.credentialRule.IsNull()) - { - CredentialRule = nullptr; - } - else - { - std::string CredentialRuleClassName = "java/lang/Integer"; - std::string CredentialRuleCtorSignature = "(I)V"; - jint jniCredentialRule = static_cast(dataResponse.credentialRule.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - CredentialRuleClassName.c_str(), CredentialRuleCtorSignature.c_str(), jniCredentialRule, CredentialRule); - } - jobject Credentials; - if (dataResponse.credentials.IsNull()) - { - Credentials = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(Credentials); - - auto iter_Credentials_1 = dataResponse.credentials.Value().begin(); - while (iter_Credentials_1.Next()) - { - auto & entry_1 = iter_Credentials_1.GetValue(); - jobject newElement_1; - jobject newElement_1_credentialType; - std::string newElement_1_credentialTypeClassName = "java/lang/Integer"; - std::string newElement_1_credentialTypeCtorSignature = "(I)V"; - jint jninewElement_1_credentialType = static_cast(entry_1.credentialType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_credentialTypeClassName.c_str(), - newElement_1_credentialTypeCtorSignature.c_str(), - jninewElement_1_credentialType, newElement_1_credentialType); - jobject newElement_1_credentialIndex; - std::string newElement_1_credentialIndexClassName = "java/lang/Integer"; - std::string newElement_1_credentialIndexCtorSignature = "(I)V"; - jint jninewElement_1_credentialIndex = static_cast(entry_1.credentialIndex); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_credentialIndexClassName.c_str(), newElement_1_credentialIndexCtorSignature.c_str(), - jninewElement_1_credentialIndex, newElement_1_credentialIndex); - - jclass credentialStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DoorLockClusterCredentialStruct", credentialStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterCredentialStruct"); - return; - } - - jmethodID credentialStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, credentialStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &credentialStructStructCtor_2); - if (err != CHIP_NO_ERROR || credentialStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterCredentialStruct constructor"); - return; - } - - newElement_1 = env->NewObject(credentialStructStructClass_2, credentialStructStructCtor_2, newElement_1_credentialType, - newElement_1_credentialIndex); - chip::JniReferences::GetInstance().AddToList(Credentials, newElement_1); - } - } - jobject CreatorFabricIndex; - if (dataResponse.creatorFabricIndex.IsNull()) - { - CreatorFabricIndex = nullptr; - } - else - { - std::string CreatorFabricIndexClassName = "java/lang/Integer"; - std::string CreatorFabricIndexCtorSignature = "(I)V"; - jint jniCreatorFabricIndex = static_cast(dataResponse.creatorFabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), - CreatorFabricIndexCtorSignature.c_str(), jniCreatorFabricIndex, - CreatorFabricIndex); - } - jobject LastModifiedFabricIndex; - if (dataResponse.lastModifiedFabricIndex.IsNull()) - { - LastModifiedFabricIndex = nullptr; - } - else - { - std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; - std::string LastModifiedFabricIndexCtorSignature = "(I)V"; - jint jniLastModifiedFabricIndex = static_cast(dataResponse.lastModifiedFabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LastModifiedFabricIndexClassName.c_str(), - LastModifiedFabricIndexCtorSignature.c_str(), - jniLastModifiedFabricIndex, LastModifiedFabricIndex); - } - jobject NextUserIndex; - if (dataResponse.nextUserIndex.IsNull()) - { - NextUserIndex = nullptr; - } - else - { - std::string NextUserIndexClassName = "java/lang/Integer"; - std::string NextUserIndexCtorSignature = "(I)V"; - jint jniNextUserIndex = static_cast(dataResponse.nextUserIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NextUserIndexClassName.c_str(), NextUserIndexCtorSignature.c_str(), jniNextUserIndex, NextUserIndex); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, UserIndex, UserName, UserUniqueID, UserStatus, UserType, CredentialRule, - Credentials, CreatorFabricIndex, LastModifiedFabricIndex, NextUserIndex); -} -CHIPDoorLockClusterSetCredentialResponseCallback::CHIPDoorLockClusterSetCredentialResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterSetCredentialResponseCallback::~CHIPDoorLockClusterSetCredentialResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject UserIndex; - if (dataResponse.userIndex.IsNull()) - { - UserIndex = nullptr; - } - else - { - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - jint jniUserIndex = static_cast(dataResponse.userIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - jniUserIndex, UserIndex); - } - jobject NextCredentialIndex; - if (dataResponse.nextCredentialIndex.IsNull()) - { - NextCredentialIndex = nullptr; - } - else - { - std::string NextCredentialIndexClassName = "java/lang/Integer"; - std::string NextCredentialIndexCtorSignature = "(I)V"; - jint jniNextCredentialIndex = static_cast(dataResponse.nextCredentialIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(NextCredentialIndexClassName.c_str(), - NextCredentialIndexCtorSignature.c_str(), jniNextCredentialIndex, - NextCredentialIndex); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, UserIndex, NextCredentialIndex); -} -CHIPDoorLockClusterGetCredentialStatusResponseCallback::CHIPDoorLockClusterGetCredentialStatusResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockClusterGetCredentialStatusResponseCallback::~CHIPDoorLockClusterGetCredentialStatusResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject CredentialExists; - std::string CredentialExistsClassName = "java/lang/Boolean"; - std::string CredentialExistsCtorSignature = "(Z)V"; - jboolean jniCredentialExists = static_cast(dataResponse.credentialExists); - chip::JniReferences::GetInstance().CreateBoxedObject( - CredentialExistsClassName.c_str(), CredentialExistsCtorSignature.c_str(), jniCredentialExists, CredentialExists); - jobject UserIndex; - if (dataResponse.userIndex.IsNull()) - { - UserIndex = nullptr; - } - else - { - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - jint jniUserIndex = static_cast(dataResponse.userIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - jniUserIndex, UserIndex); - } - jobject CreatorFabricIndex; - if (dataResponse.creatorFabricIndex.IsNull()) - { - CreatorFabricIndex = nullptr; - } - else - { - std::string CreatorFabricIndexClassName = "java/lang/Integer"; - std::string CreatorFabricIndexCtorSignature = "(I)V"; - jint jniCreatorFabricIndex = static_cast(dataResponse.creatorFabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), - CreatorFabricIndexCtorSignature.c_str(), jniCreatorFabricIndex, - CreatorFabricIndex); - } - jobject LastModifiedFabricIndex; - if (dataResponse.lastModifiedFabricIndex.IsNull()) - { - LastModifiedFabricIndex = nullptr; - } - else - { - std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; - std::string LastModifiedFabricIndexCtorSignature = "(I)V"; - jint jniLastModifiedFabricIndex = static_cast(dataResponse.lastModifiedFabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(LastModifiedFabricIndexClassName.c_str(), - LastModifiedFabricIndexCtorSignature.c_str(), - jniLastModifiedFabricIndex, LastModifiedFabricIndex); - } - jobject NextCredentialIndex; - if (dataResponse.nextCredentialIndex.IsNull()) - { - NextCredentialIndex = nullptr; - } - else - { - std::string NextCredentialIndexClassName = "java/lang/Integer"; - std::string NextCredentialIndexCtorSignature = "(I)V"; - jint jniNextCredentialIndex = static_cast(dataResponse.nextCredentialIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(NextCredentialIndexClassName.c_str(), - NextCredentialIndexCtorSignature.c_str(), jniNextCredentialIndex, - NextCredentialIndex); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, CredentialExists, UserIndex, CreatorFabricIndex, LastModifiedFabricIndex, - NextCredentialIndex); -} -CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CHIPThermostatClusterGetWeeklyScheduleResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatClusterGetWeeklyScheduleResponseCallback::~CHIPThermostatClusterGetWeeklyScheduleResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NumberOfTransitionsForSequence; - std::string NumberOfTransitionsForSequenceClassName = "java/lang/Integer"; - std::string NumberOfTransitionsForSequenceCtorSignature = "(I)V"; - jint jniNumberOfTransitionsForSequence = static_cast(dataResponse.numberOfTransitionsForSequence); - chip::JniReferences::GetInstance().CreateBoxedObject(NumberOfTransitionsForSequenceClassName.c_str(), - NumberOfTransitionsForSequenceCtorSignature.c_str(), - jniNumberOfTransitionsForSequence, NumberOfTransitionsForSequence); - jobject DayOfWeekForSequence; - std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; - std::string DayOfWeekForSequenceCtorSignature = "(I)V"; - jint jniDayOfWeekForSequence = static_cast(dataResponse.dayOfWeekForSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), - DayOfWeekForSequenceCtorSignature.c_str(), jniDayOfWeekForSequence, - DayOfWeekForSequence); - jobject ModeForSequence; - std::string ModeForSequenceClassName = "java/lang/Integer"; - std::string ModeForSequenceCtorSignature = "(I)V"; - jint jniModeForSequence = static_cast(dataResponse.modeForSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - ModeForSequenceClassName.c_str(), ModeForSequenceCtorSignature.c_str(), jniModeForSequence, ModeForSequence); - jobject Transitions; - chip::JniReferences::GetInstance().CreateArrayList(Transitions); - - auto iter_Transitions_0 = dataResponse.transitions.begin(); - while (iter_Transitions_0.Next()) - { - auto & entry_0 = iter_Transitions_0.GetValue(); - jobject newElement_0; - jobject newElement_0_transitionTime; - std::string newElement_0_transitionTimeClassName = "java/lang/Integer"; - std::string newElement_0_transitionTimeCtorSignature = "(I)V"; - jint jninewElement_0_transitionTime = static_cast(entry_0.transitionTime); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_transitionTimeClassName.c_str(), - newElement_0_transitionTimeCtorSignature.c_str(), - jninewElement_0_transitionTime, newElement_0_transitionTime); - jobject newElement_0_heatSetpoint; - if (entry_0.heatSetpoint.IsNull()) - { - newElement_0_heatSetpoint = nullptr; - } - else - { - std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; - std::string newElement_0_heatSetpointCtorSignature = "(I)V"; - jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), - newElement_0_heatSetpointCtorSignature.c_str(), - jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); - } - jobject newElement_0_coolSetpoint; - if (entry_0.coolSetpoint.IsNull()) - { - newElement_0_coolSetpoint = nullptr; - } - else - { - std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; - std::string newElement_0_coolSetpointCtorSignature = "(I)V"; - jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), - newElement_0_coolSetpointCtorSignature.c_str(), - jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); - } - - jclass weeklyScheduleTransitionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct", - weeklyScheduleTransitionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct"); - return; - } - - jmethodID weeklyScheduleTransitionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, weeklyScheduleTransitionStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &weeklyScheduleTransitionStructStructCtor_1); - if (err != CHIP_NO_ERROR || weeklyScheduleTransitionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(weeklyScheduleTransitionStructStructClass_1, weeklyScheduleTransitionStructStructCtor_1, - newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); - chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekForSequence, ModeForSequence, - Transitions); -} -CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelClusterChangeChannelResponseCallback::~CHIPChannelClusterChangeChannelResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPChannelClusterProgramGuideResponseCallback::CHIPChannelClusterProgramGuideResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelClusterProgramGuideResponseCallback::~CHIPChannelClusterProgramGuideResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPChannelClusterProgramGuideResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Lchip/devicecontroller/ChipStructs$ChannelClusterChannelPagingStruct;Ljava/util/ArrayList;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Paging; - jobject Paging_previousToken; - if (!dataResponse.paging.previousToken.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_previousToken); - } - else - { - jobject Paging_previousTokenInsideOptional; - if (dataResponse.paging.previousToken.Value().IsNull()) - { - Paging_previousTokenInsideOptional = nullptr; - } - else - { - jobject Paging_previousTokenInsideOptional_limit; - if (!dataResponse.paging.previousToken.Value().Value().limit.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_previousTokenInsideOptional_limit); - } - else - { - jobject Paging_previousTokenInsideOptional_limitInsideOptional; - std::string Paging_previousTokenInsideOptional_limitInsideOptionalClassName = "java/lang/Integer"; - std::string Paging_previousTokenInsideOptional_limitInsideOptionalCtorSignature = "(I)V"; - jint jniPaging_previousTokenInsideOptional_limitInsideOptional = - static_cast(dataResponse.paging.previousToken.Value().Value().limit.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - Paging_previousTokenInsideOptional_limitInsideOptionalClassName.c_str(), - Paging_previousTokenInsideOptional_limitInsideOptionalCtorSignature.c_str(), - jniPaging_previousTokenInsideOptional_limitInsideOptional, - Paging_previousTokenInsideOptional_limitInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(Paging_previousTokenInsideOptional_limitInsideOptional, - Paging_previousTokenInsideOptional_limit); - } - jobject Paging_previousTokenInsideOptional_after; - if (!dataResponse.paging.previousToken.Value().Value().after.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_previousTokenInsideOptional_after); - } - else - { - jobject Paging_previousTokenInsideOptional_afterInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.paging.previousToken.Value().Value().after.Value(), - Paging_previousTokenInsideOptional_afterInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(Paging_previousTokenInsideOptional_afterInsideOptional, - Paging_previousTokenInsideOptional_after); - } - jobject Paging_previousTokenInsideOptional_before; - if (!dataResponse.paging.previousToken.Value().Value().before.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_previousTokenInsideOptional_before); - } - else - { - jobject Paging_previousTokenInsideOptional_beforeInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.paging.previousToken.Value().Value().before.Value(), - Paging_previousTokenInsideOptional_beforeInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(Paging_previousTokenInsideOptional_beforeInsideOptional, - Paging_previousTokenInsideOptional_before); - } - - jclass pageTokenStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterPageTokenStruct", pageTokenStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterPageTokenStruct"); - return; - } - - jmethodID pageTokenStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, pageTokenStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &pageTokenStructStructCtor_3); - if (err != CHIP_NO_ERROR || pageTokenStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterPageTokenStruct constructor"); - return; - } - - Paging_previousTokenInsideOptional = - env->NewObject(pageTokenStructStructClass_3, pageTokenStructStructCtor_3, Paging_previousTokenInsideOptional_limit, - Paging_previousTokenInsideOptional_after, Paging_previousTokenInsideOptional_before); - } - chip::JniReferences::GetInstance().CreateOptional(Paging_previousTokenInsideOptional, Paging_previousToken); - } - jobject Paging_nextToken; - if (!dataResponse.paging.nextToken.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_nextToken); - } - else - { - jobject Paging_nextTokenInsideOptional; - if (dataResponse.paging.nextToken.Value().IsNull()) - { - Paging_nextTokenInsideOptional = nullptr; - } - else - { - jobject Paging_nextTokenInsideOptional_limit; - if (!dataResponse.paging.nextToken.Value().Value().limit.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_nextTokenInsideOptional_limit); - } - else - { - jobject Paging_nextTokenInsideOptional_limitInsideOptional; - std::string Paging_nextTokenInsideOptional_limitInsideOptionalClassName = "java/lang/Integer"; - std::string Paging_nextTokenInsideOptional_limitInsideOptionalCtorSignature = "(I)V"; - jint jniPaging_nextTokenInsideOptional_limitInsideOptional = - static_cast(dataResponse.paging.nextToken.Value().Value().limit.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - Paging_nextTokenInsideOptional_limitInsideOptionalClassName.c_str(), - Paging_nextTokenInsideOptional_limitInsideOptionalCtorSignature.c_str(), - jniPaging_nextTokenInsideOptional_limitInsideOptional, Paging_nextTokenInsideOptional_limitInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(Paging_nextTokenInsideOptional_limitInsideOptional, - Paging_nextTokenInsideOptional_limit); - } - jobject Paging_nextTokenInsideOptional_after; - if (!dataResponse.paging.nextToken.Value().Value().after.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_nextTokenInsideOptional_after); - } - else - { - jobject Paging_nextTokenInsideOptional_afterInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.paging.nextToken.Value().Value().after.Value(), - Paging_nextTokenInsideOptional_afterInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(Paging_nextTokenInsideOptional_afterInsideOptional, - Paging_nextTokenInsideOptional_after); - } - jobject Paging_nextTokenInsideOptional_before; - if (!dataResponse.paging.nextToken.Value().Value().before.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Paging_nextTokenInsideOptional_before); - } - else - { - jobject Paging_nextTokenInsideOptional_beforeInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.paging.nextToken.Value().Value().before.Value(), - Paging_nextTokenInsideOptional_beforeInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(Paging_nextTokenInsideOptional_beforeInsideOptional, - Paging_nextTokenInsideOptional_before); - } - - jclass pageTokenStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterPageTokenStruct", pageTokenStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterPageTokenStruct"); - return; - } - - jmethodID pageTokenStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, pageTokenStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &pageTokenStructStructCtor_3); - if (err != CHIP_NO_ERROR || pageTokenStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterPageTokenStruct constructor"); - return; - } - - Paging_nextTokenInsideOptional = - env->NewObject(pageTokenStructStructClass_3, pageTokenStructStructCtor_3, Paging_nextTokenInsideOptional_limit, - Paging_nextTokenInsideOptional_after, Paging_nextTokenInsideOptional_before); - } - chip::JniReferences::GetInstance().CreateOptional(Paging_nextTokenInsideOptional, Paging_nextToken); - } - - jclass channelPagingStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelPagingStruct", - channelPagingStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelPagingStruct"); - return; - } - - jmethodID channelPagingStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, channelPagingStructStructClass_0, "", - "(Ljava/util/Optional;Ljava/util/Optional;)V", - &channelPagingStructStructCtor_0); - if (err != CHIP_NO_ERROR || channelPagingStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelPagingStruct constructor"); - return; - } - - Paging = - env->NewObject(channelPagingStructStructClass_0, channelPagingStructStructCtor_0, Paging_previousToken, Paging_nextToken); - jobject ProgramList; - chip::JniReferences::GetInstance().CreateArrayList(ProgramList); - - auto iter_ProgramList_0 = dataResponse.programList.begin(); - while (iter_ProgramList_0.Next()) - { - auto & entry_0 = iter_ProgramList_0.GetValue(); - jobject newElement_0; - jobject newElement_0_identifier; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier, newElement_0_identifier)); - jobject newElement_0_channel; - jobject newElement_0_channel_majorNumber; - std::string newElement_0_channel_majorNumberClassName = "java/lang/Integer"; - std::string newElement_0_channel_majorNumberCtorSignature = "(I)V"; - jint jninewElement_0_channel_majorNumber = static_cast(entry_0.channel.majorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_channel_majorNumberClassName.c_str(), newElement_0_channel_majorNumberCtorSignature.c_str(), - jninewElement_0_channel_majorNumber, newElement_0_channel_majorNumber); - jobject newElement_0_channel_minorNumber; - std::string newElement_0_channel_minorNumberClassName = "java/lang/Integer"; - std::string newElement_0_channel_minorNumberCtorSignature = "(I)V"; - jint jninewElement_0_channel_minorNumber = static_cast(entry_0.channel.minorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_channel_minorNumberClassName.c_str(), newElement_0_channel_minorNumberCtorSignature.c_str(), - jninewElement_0_channel_minorNumber, newElement_0_channel_minorNumber); - jobject newElement_0_channel_name; - if (!entry_0.channel.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_name); - } - else - { - jobject newElement_0_channel_nameInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.name.Value(), - newElement_0_channel_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_nameInsideOptional, newElement_0_channel_name); - } - jobject newElement_0_channel_callSign; - if (!entry_0.channel.callSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_callSign); - } - else - { - jobject newElement_0_channel_callSignInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.callSign.Value(), - newElement_0_channel_callSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_callSignInsideOptional, - newElement_0_channel_callSign); - } - jobject newElement_0_channel_affiliateCallSign; - if (!entry_0.channel.affiliateCallSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_affiliateCallSign); - } - else - { - jobject newElement_0_channel_affiliateCallSignInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.channel.affiliateCallSign.Value(), newElement_0_channel_affiliateCallSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_affiliateCallSignInsideOptional, - newElement_0_channel_affiliateCallSign); - } - jobject newElement_0_channel_identifier; - if (!entry_0.channel.identifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_identifier); - } - else - { - jobject newElement_0_channel_identifierInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.identifier.Value(), - newElement_0_channel_identifierInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_identifierInsideOptional, - newElement_0_channel_identifier); - } - jobject newElement_0_channel_type; - if (!entry_0.channel.type.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_type); - } - else - { - jobject newElement_0_channel_typeInsideOptional; - std::string newElement_0_channel_typeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_channel_typeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_channel_typeInsideOptional = static_cast(entry_0.channel.type.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channel_typeInsideOptionalClassName.c_str(), - newElement_0_channel_typeInsideOptionalCtorSignature.c_str(), - jninewElement_0_channel_typeInsideOptional, - newElement_0_channel_typeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_typeInsideOptional, newElement_0_channel_type); - } - - jclass channelInfoStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); - return; - } - - jmethodID channelInfoStructStructCtor_2; - err = - chip::JniReferences::GetInstance().FindMethod(env, channelInfoStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &channelInfoStructStructCtor_2); - if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); - return; - } - - newElement_0_channel = - env->NewObject(channelInfoStructStructClass_2, channelInfoStructStructCtor_2, newElement_0_channel_majorNumber, - newElement_0_channel_minorNumber, newElement_0_channel_name, newElement_0_channel_callSign, - newElement_0_channel_affiliateCallSign, newElement_0_channel_identifier, newElement_0_channel_type); - jobject newElement_0_startTime; - std::string newElement_0_startTimeClassName = "java/lang/Long"; - std::string newElement_0_startTimeCtorSignature = "(J)V"; - jlong jninewElement_0_startTime = static_cast(entry_0.startTime); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), - newElement_0_startTimeCtorSignature.c_str(), - jninewElement_0_startTime, newElement_0_startTime); - jobject newElement_0_endTime; - std::string newElement_0_endTimeClassName = "java/lang/Long"; - std::string newElement_0_endTimeCtorSignature = "(J)V"; - jlong jninewElement_0_endTime = static_cast(entry_0.endTime); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endTimeClassName.c_str(), - newElement_0_endTimeCtorSignature.c_str(), - jninewElement_0_endTime, newElement_0_endTime); - jobject newElement_0_title; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.title, newElement_0_title)); - jobject newElement_0_subtitle; - if (!entry_0.subtitle.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_subtitle); - } - else - { - jobject newElement_0_subtitleInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.subtitle.Value(), newElement_0_subtitleInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_subtitleInsideOptional, newElement_0_subtitle); - } - jobject newElement_0_description; - if (!entry_0.description.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_description); - } - else - { - jobject newElement_0_descriptionInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description.Value(), - newElement_0_descriptionInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_descriptionInsideOptional, newElement_0_description); - } - jobject newElement_0_audioLanguages; - if (!entry_0.audioLanguages.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_audioLanguages); - } - else - { - jobject newElement_0_audioLanguagesInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_audioLanguagesInsideOptional); - - auto iter_newElement_0_audioLanguagesInsideOptional_3 = entry_0.audioLanguages.Value().begin(); - while (iter_newElement_0_audioLanguagesInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_audioLanguagesInsideOptional_3.GetValue(); - jobject newElement_3; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3, newElement_3)); - chip::JniReferences::GetInstance().AddToList(newElement_0_audioLanguagesInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_audioLanguagesInsideOptional, - newElement_0_audioLanguages); - } - jobject newElement_0_ratings; - if (!entry_0.ratings.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratings); - } - else - { - jobject newElement_0_ratingsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_ratingsInsideOptional); - - auto iter_newElement_0_ratingsInsideOptional_3 = entry_0.ratings.Value().begin(); - while (iter_newElement_0_ratingsInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_ratingsInsideOptional_3.GetValue(); - jobject newElement_3; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3, newElement_3)); - chip::JniReferences::GetInstance().AddToList(newElement_0_ratingsInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingsInsideOptional, newElement_0_ratings); - } - jobject newElement_0_thumbnailUrl; - if (!entry_0.thumbnailUrl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_thumbnailUrl); - } - else - { - jobject newElement_0_thumbnailUrlInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.thumbnailUrl.Value(), - newElement_0_thumbnailUrlInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_thumbnailUrlInsideOptional, newElement_0_thumbnailUrl); - } - jobject newElement_0_posterArtUrl; - if (!entry_0.posterArtUrl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_posterArtUrl); - } - else - { - jobject newElement_0_posterArtUrlInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.posterArtUrl.Value(), - newElement_0_posterArtUrlInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_posterArtUrlInsideOptional, newElement_0_posterArtUrl); - } - jobject newElement_0_dvbiUrl; - if (!entry_0.dvbiUrl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_dvbiUrl); - } - else - { - jobject newElement_0_dvbiUrlInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.dvbiUrl.Value(), newElement_0_dvbiUrlInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_dvbiUrlInsideOptional, newElement_0_dvbiUrl); - } - jobject newElement_0_releaseDate; - if (!entry_0.releaseDate.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_releaseDate); - } - else - { - jobject newElement_0_releaseDateInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.releaseDate.Value(), - newElement_0_releaseDateInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_releaseDateInsideOptional, newElement_0_releaseDate); - } - jobject newElement_0_parentalGuidanceText; - if (!entry_0.parentalGuidanceText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_parentalGuidanceText); - } - else - { - jobject newElement_0_parentalGuidanceTextInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.parentalGuidanceText.Value(), - newElement_0_parentalGuidanceTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_parentalGuidanceTextInsideOptional, - newElement_0_parentalGuidanceText); - } - jobject newElement_0_recordingFlag; - if (!entry_0.recordingFlag.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_recordingFlag); - } - else - { - jobject newElement_0_recordingFlagInsideOptional; - std::string newElement_0_recordingFlagInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_recordingFlagInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_recordingFlagInsideOptional = static_cast(entry_0.recordingFlag.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_recordingFlagInsideOptionalClassName.c_str(), - newElement_0_recordingFlagInsideOptionalCtorSignature.c_str(), jninewElement_0_recordingFlagInsideOptional, - newElement_0_recordingFlagInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_recordingFlagInsideOptional, newElement_0_recordingFlag); - } - jobject newElement_0_seriesInfo; - if (!entry_0.seriesInfo.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_seriesInfo); - } - else - { - jobject newElement_0_seriesInfoInsideOptional; - if (entry_0.seriesInfo.Value().IsNull()) - { - newElement_0_seriesInfoInsideOptional = nullptr; - } - else - { - jobject newElement_0_seriesInfoInsideOptional_season; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.seriesInfo.Value().Value().season, - newElement_0_seriesInfoInsideOptional_season)); - jobject newElement_0_seriesInfoInsideOptional_episode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.seriesInfo.Value().Value().episode, newElement_0_seriesInfoInsideOptional_episode)); - - jclass seriesInfoStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterSeriesInfoStruct", seriesInfoStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterSeriesInfoStruct"); - return; - } - - jmethodID seriesInfoStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, seriesInfoStructStructClass_4, "", - "(Ljava/lang/String;Ljava/lang/String;)V", - &seriesInfoStructStructCtor_4); - if (err != CHIP_NO_ERROR || seriesInfoStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterSeriesInfoStruct constructor"); - return; - } - - newElement_0_seriesInfoInsideOptional = - env->NewObject(seriesInfoStructStructClass_4, seriesInfoStructStructCtor_4, - newElement_0_seriesInfoInsideOptional_season, newElement_0_seriesInfoInsideOptional_episode); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_seriesInfoInsideOptional, newElement_0_seriesInfo); - } - jobject newElement_0_categoryList; - if (!entry_0.categoryList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_categoryList); - } - else - { - jobject newElement_0_categoryListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_categoryListInsideOptional); - - auto iter_newElement_0_categoryListInsideOptional_3 = entry_0.categoryList.Value().begin(); - while (iter_newElement_0_categoryListInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_categoryListInsideOptional_3.GetValue(); - jobject newElement_3; - jobject newElement_3_category; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.category, newElement_3_category)); - jobject newElement_3_subCategory; - if (!entry_3.subCategory.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_subCategory); - } - else - { - jobject newElement_3_subCategoryInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.subCategory.Value(), - newElement_3_subCategoryInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_3_subCategoryInsideOptional, - newElement_3_subCategory); - } - - jclass programCategoryStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCategoryStruct", - programCategoryStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCategoryStruct"); - return; - } - - jmethodID programCategoryStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, programCategoryStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &programCategoryStructStructCtor_4); - if (err != CHIP_NO_ERROR || programCategoryStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCategoryStruct constructor"); - return; - } - - newElement_3 = env->NewObject(programCategoryStructStructClass_4, programCategoryStructStructCtor_4, - newElement_3_category, newElement_3_subCategory); - chip::JniReferences::GetInstance().AddToList(newElement_0_categoryListInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_categoryListInsideOptional, newElement_0_categoryList); - } - jobject newElement_0_castList; - if (!entry_0.castList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_castList); - } - else - { - jobject newElement_0_castListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_castListInsideOptional); - - auto iter_newElement_0_castListInsideOptional_3 = entry_0.castList.Value().begin(); - while (iter_newElement_0_castListInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_castListInsideOptional_3.GetValue(); - jobject newElement_3; - jobject newElement_3_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.name, newElement_3_name)); - jobject newElement_3_role; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.role, newElement_3_role)); - - jclass programCastStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCastStruct", programCastStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCastStruct"); - return; - } - - jmethodID programCastStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, programCastStructStructClass_4, "", - "(Ljava/lang/String;Ljava/lang/String;)V", - &programCastStructStructCtor_4); - if (err != CHIP_NO_ERROR || programCastStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCastStruct constructor"); - return; - } - - newElement_3 = env->NewObject(programCastStructStructClass_4, programCastStructStructCtor_4, newElement_3_name, - newElement_3_role); - chip::JniReferences::GetInstance().AddToList(newElement_0_castListInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_castListInsideOptional, newElement_0_castList); - } - jobject newElement_0_externalIDList; - if (!entry_0.externalIDList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_externalIDList); - } - else - { - jobject newElement_0_externalIDListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_externalIDListInsideOptional); - - auto iter_newElement_0_externalIDListInsideOptional_3 = entry_0.externalIDList.Value().begin(); - while (iter_newElement_0_externalIDListInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_externalIDListInsideOptional_3.GetValue(); - jobject newElement_3; - jobject newElement_3_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.name, newElement_3_name)); - jobject newElement_3_role; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.role, newElement_3_role)); - - jclass programCastStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCastStruct", programCastStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCastStruct"); - return; - } - - jmethodID programCastStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, programCastStructStructClass_4, "", - "(Ljava/lang/String;Ljava/lang/String;)V", - &programCastStructStructCtor_4); - if (err != CHIP_NO_ERROR || programCastStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCastStruct constructor"); - return; - } - - newElement_3 = env->NewObject(programCastStructStructClass_4, programCastStructStructCtor_4, newElement_3_name, - newElement_3_role); - chip::JniReferences::GetInstance().AddToList(newElement_0_externalIDListInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_externalIDListInsideOptional, - newElement_0_externalIDList); - } - - jclass programStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramStruct", - programStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramStruct"); - return; - } - - jmethodID programStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, programStructStructClass_1, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct;Ljava/lang/Long;Ljava/lang/" - "Long;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" - "util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &programStructStructCtor_1); - if (err != CHIP_NO_ERROR || programStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramStruct constructor"); - return; - } - - newElement_0 = env->NewObject( - programStructStructClass_1, programStructStructCtor_1, newElement_0_identifier, newElement_0_channel, - newElement_0_startTime, newElement_0_endTime, newElement_0_title, newElement_0_subtitle, newElement_0_description, - newElement_0_audioLanguages, newElement_0_ratings, newElement_0_thumbnailUrl, newElement_0_posterArtUrl, - newElement_0_dvbiUrl, newElement_0_releaseDate, newElement_0_parentalGuidanceText, newElement_0_recordingFlag, - newElement_0_seriesInfo, newElement_0_categoryList, newElement_0_castList, newElement_0_externalIDList); - chip::JniReferences::GetInstance().AddToList(ProgramList, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Paging, ProgramList); -} -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorClusterNavigateTargetResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackClusterPlaybackResponseCallback::~CHIPMediaPlaybackClusterPlaybackResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPKeypadInputClusterSendKeyResponseCallback::CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPKeypadInputClusterSendKeyResponseCallback::~CHIPKeypadInputClusterSendKeyResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status); -} -CHIPContentLauncherClusterLauncherResponseCallback::CHIPContentLauncherClusterLauncherResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherClusterLauncherResponseCallback::~CHIPContentLauncherClusterLauncherResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPContentLauncherClusterLauncherResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPApplicationLauncherClusterLauncherResponseCallback::CHIPApplicationLauncherClusterLauncherResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherClusterLauncherResponseCallback::~CHIPApplicationLauncherClusterLauncherResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - jbyteArray DataInsideOptionalByteArray = env->NewByteArray(static_cast(dataResponse.data.Value().size())); - env->SetByteArrayRegion(DataInsideOptionalByteArray, 0, static_cast(dataResponse.data.Value().size()), - reinterpret_cast(dataResponse.data.Value().data())); - DataInsideOptional = DataInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPAccountLoginClusterGetSetupPINResponseCallback::CHIPAccountLoginClusterGetSetupPINResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccountLoginClusterGetSetupPINResponseCallback::~CHIPAccountLoginClusterGetSetupPINResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject SetupPIN; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.setupPIN, SetupPIN)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, SetupPIN); -} -CHIPContentControlClusterResetPINResponseCallback::CHIPContentControlClusterResetPINResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlClusterResetPINResponseCallback::~CHIPContentControlClusterResetPINResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPContentControlClusterResetPINResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject PINCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.PINCode, PINCode)); - - env->CallVoidMethod(javaCallbackRef, javaMethod, PINCode); -} -CHIPContentAppObserverClusterContentAppMessageResponseCallback::CHIPContentAppObserverClusterContentAppMessageResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentAppObserverClusterContentAppMessageResponseCallback::~CHIPContentAppObserverClusterContentAppMessageResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPContentAppObserverClusterContentAppMessageResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - jobject EncodingHint; - if (!dataResponse.encodingHint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, EncodingHint); - } - else - { - jobject EncodingHintInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.encodingHint.Value(), EncodingHintInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(EncodingHintInsideOptional, EncodingHint); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data, EncodingHint); -} -CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback:: - CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback:: - ~CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback::CallbackFn( - void * context, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject profileCount; - std::string profileCountClassName = "java/lang/Integer"; - std::string profileCountCtorSignature = "(I)V"; - jint jniprofileCount = static_cast(dataResponse.profileCount); - chip::JniReferences::GetInstance().CreateBoxedObject(profileCountClassName.c_str(), profileCountCtorSignature.c_str(), - jniprofileCount, profileCount); - jobject profileIntervalPeriod; - std::string profileIntervalPeriodClassName = "java/lang/Integer"; - std::string profileIntervalPeriodCtorSignature = "(I)V"; - jint jniprofileIntervalPeriod = static_cast(dataResponse.profileIntervalPeriod); - chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), - profileIntervalPeriodCtorSignature.c_str(), jniprofileIntervalPeriod, - profileIntervalPeriod); - jobject maxNumberOfIntervals; - std::string maxNumberOfIntervalsClassName = "java/lang/Integer"; - std::string maxNumberOfIntervalsCtorSignature = "(I)V"; - jint jnimaxNumberOfIntervals = static_cast(dataResponse.maxNumberOfIntervals); - chip::JniReferences::GetInstance().CreateBoxedObject(maxNumberOfIntervalsClassName.c_str(), - maxNumberOfIntervalsCtorSignature.c_str(), jnimaxNumberOfIntervals, - maxNumberOfIntervals); - jobject listOfAttributes; - chip::JniReferences::GetInstance().CreateArrayList(listOfAttributes); - - auto iter_listOfAttributes_0 = dataResponse.listOfAttributes.begin(); - while (iter_listOfAttributes_0.Next()) - { - auto & entry_0 = iter_listOfAttributes_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(listOfAttributes, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, profileCount, profileIntervalPeriod, maxNumberOfIntervals, listOfAttributes); -} -CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback:: - CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback:: - ~CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback::CallbackFn( - void * context, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject startTime; - std::string startTimeClassName = "java/lang/Long"; - std::string startTimeCtorSignature = "(J)V"; - jlong jnistartTime = static_cast(dataResponse.startTime); - chip::JniReferences::GetInstance().CreateBoxedObject(startTimeClassName.c_str(), startTimeCtorSignature.c_str(), - jnistartTime, startTime); - jobject status; - std::string statusClassName = "java/lang/Integer"; - std::string statusCtorSignature = "(I)V"; - jint jnistatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), jnistatus, - status); - jobject profileIntervalPeriod; - std::string profileIntervalPeriodClassName = "java/lang/Integer"; - std::string profileIntervalPeriodCtorSignature = "(I)V"; - jint jniprofileIntervalPeriod = static_cast(dataResponse.profileIntervalPeriod); - chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), - profileIntervalPeriodCtorSignature.c_str(), jniprofileIntervalPeriod, - profileIntervalPeriod); - jobject numberOfIntervalsDelivered; - std::string numberOfIntervalsDeliveredClassName = "java/lang/Integer"; - std::string numberOfIntervalsDeliveredCtorSignature = "(I)V"; - jint jninumberOfIntervalsDelivered = static_cast(dataResponse.numberOfIntervalsDelivered); - chip::JniReferences::GetInstance().CreateBoxedObject(numberOfIntervalsDeliveredClassName.c_str(), - numberOfIntervalsDeliveredCtorSignature.c_str(), - jninumberOfIntervalsDelivered, numberOfIntervalsDelivered); - jobject attributeId; - std::string attributeIdClassName = "java/lang/Integer"; - std::string attributeIdCtorSignature = "(I)V"; - jint jniattributeId = static_cast(dataResponse.attributeId); - chip::JniReferences::GetInstance().CreateBoxedObject(attributeIdClassName.c_str(), attributeIdCtorSignature.c_str(), - jniattributeId, attributeId); - jobject intervals; - chip::JniReferences::GetInstance().CreateArrayList(intervals); - - auto iter_intervals_0 = dataResponse.intervals.begin(); - while (iter_intervals_0.Next()) - { - auto & entry_0 = iter_intervals_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(intervals, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, startTime, status, profileIntervalPeriod, numberOfIntervalsDelivered, - attributeId, intervals); -} -CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestSpecificResponseCallback::~CHIPUnitTestingClusterTestSpecificResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; - std::string returnValueCtorSignature = "(I)V"; - jint jnireturnValue = static_cast(dataResponse.returnValue); - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - jnireturnValue, returnValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); -} -CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CHIPUnitTestingClusterTestAddArgumentsResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestAddArgumentsResponseCallback::~CHIPUnitTestingClusterTestAddArgumentsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; - std::string returnValueCtorSignature = "(I)V"; - jint jnireturnValue = static_cast(dataResponse.returnValue); - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - jnireturnValue, returnValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); -} -CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::CHIPUnitTestingClusterTestSimpleArgumentResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::~CHIPUnitTestingClusterTestSimpleArgumentResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject returnValue; - std::string returnValueClassName = "java/lang/Boolean"; - std::string returnValueCtorSignature = "(Z)V"; - jboolean jnireturnValue = static_cast(dataResponse.returnValue); - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - jnireturnValue, returnValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); -} -CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::~CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/" - "ArrayList;Ljava/lang/Integer;Ljava/lang/Boolean;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject arg1; - chip::JniReferences::GetInstance().CreateArrayList(arg1); - - auto iter_arg1_0 = dataResponse.arg1.begin(); - while (iter_arg1_0.Next()) - { - auto & entry_0 = iter_arg1_0.GetValue(); - jobject newElement_0; - jobject newElement_0_a; - std::string newElement_0_aClassName = "java/lang/Integer"; - std::string newElement_0_aCtorSignature = "(I)V"; - jint jninewElement_0_a = static_cast(entry_0.a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), jninewElement_0_a, newElement_0_a); - jobject newElement_0_b; - std::string newElement_0_bClassName = "java/lang/Boolean"; - std::string newElement_0_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_b = static_cast(entry_0.b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), jninewElement_0_b, newElement_0_b); - jobject newElement_0_c; - jobject newElement_0_c_a; - std::string newElement_0_c_aClassName = "java/lang/Integer"; - std::string newElement_0_c_aCtorSignature = "(I)V"; - jint jninewElement_0_c_a = static_cast(entry_0.c.a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_aClassName.c_str(), newElement_0_c_aCtorSignature.c_str(), jninewElement_0_c_a, newElement_0_c_a); - jobject newElement_0_c_b; - std::string newElement_0_c_bClassName = "java/lang/Boolean"; - std::string newElement_0_c_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_c_b = static_cast(entry_0.c.b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_bClassName.c_str(), newElement_0_c_bCtorSignature.c_str(), jninewElement_0_c_b, newElement_0_c_b); - jobject newElement_0_c_c; - std::string newElement_0_c_cClassName = "java/lang/Integer"; - std::string newElement_0_c_cCtorSignature = "(I)V"; - jint jninewElement_0_c_c = static_cast(entry_0.c.c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_cClassName.c_str(), newElement_0_c_cCtorSignature.c_str(), jninewElement_0_c_c, newElement_0_c_c); - jobject newElement_0_c_d; - jbyteArray newElement_0_c_dByteArray = env->NewByteArray(static_cast(entry_0.c.d.size())); - env->SetByteArrayRegion(newElement_0_c_dByteArray, 0, static_cast(entry_0.c.d.size()), - reinterpret_cast(entry_0.c.d.data())); - newElement_0_c_d = newElement_0_c_dByteArray; - jobject newElement_0_c_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.c.e, newElement_0_c_e)); - jobject newElement_0_c_f; - std::string newElement_0_c_fClassName = "java/lang/Integer"; - std::string newElement_0_c_fCtorSignature = "(I)V"; - jint jninewElement_0_c_f = static_cast(entry_0.c.f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_fClassName.c_str(), newElement_0_c_fCtorSignature.c_str(), jninewElement_0_c_f, newElement_0_c_f); - jobject newElement_0_c_g; - std::string newElement_0_c_gClassName = "java/lang/Float"; - std::string newElement_0_c_gCtorSignature = "(F)V"; - jfloat jninewElement_0_c_g = static_cast(entry_0.c.g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_gClassName.c_str(), newElement_0_c_gCtorSignature.c_str(), jninewElement_0_c_g, newElement_0_c_g); - jobject newElement_0_c_h; - std::string newElement_0_c_hClassName = "java/lang/Double"; - std::string newElement_0_c_hCtorSignature = "(D)V"; - jdouble jninewElement_0_c_h = static_cast(entry_0.c.h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_hClassName.c_str(), newElement_0_c_hCtorSignature.c_str(), jninewElement_0_c_h, newElement_0_c_h); - - jclass simpleStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_2); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0_c = env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_c_a, newElement_0_c_b, - newElement_0_c_c, newElement_0_c_d, newElement_0_c_e, newElement_0_c_f, newElement_0_c_g, - newElement_0_c_h); - jobject newElement_0_d; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_d); - - auto iter_newElement_0_d_2 = entry_0.d.begin(); - while (iter_newElement_0_d_2.Next()) - { - auto & entry_2 = iter_newElement_0_d_2.GetValue(); - jobject newElement_2; - jobject newElement_2_a; - std::string newElement_2_aClassName = "java/lang/Integer"; - std::string newElement_2_aCtorSignature = "(I)V"; - jint jninewElement_2_a = static_cast(entry_2.a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_aClassName.c_str(), newElement_2_aCtorSignature.c_str(), jninewElement_2_a, newElement_2_a); - jobject newElement_2_b; - std::string newElement_2_bClassName = "java/lang/Boolean"; - std::string newElement_2_bCtorSignature = "(Z)V"; - jboolean jninewElement_2_b = static_cast(entry_2.b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_bClassName.c_str(), newElement_2_bCtorSignature.c_str(), jninewElement_2_b, newElement_2_b); - jobject newElement_2_c; - std::string newElement_2_cClassName = "java/lang/Integer"; - std::string newElement_2_cCtorSignature = "(I)V"; - jint jninewElement_2_c = static_cast(entry_2.c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_cClassName.c_str(), newElement_2_cCtorSignature.c_str(), jninewElement_2_c, newElement_2_c); - jobject newElement_2_d; - jbyteArray newElement_2_dByteArray = env->NewByteArray(static_cast(entry_2.d.size())); - env->SetByteArrayRegion(newElement_2_dByteArray, 0, static_cast(entry_2.d.size()), - reinterpret_cast(entry_2.d.data())); - newElement_2_d = newElement_2_dByteArray; - jobject newElement_2_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.e, newElement_2_e)); - jobject newElement_2_f; - std::string newElement_2_fClassName = "java/lang/Integer"; - std::string newElement_2_fCtorSignature = "(I)V"; - jint jninewElement_2_f = static_cast(entry_2.f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_fClassName.c_str(), newElement_2_fCtorSignature.c_str(), jninewElement_2_f, newElement_2_f); - jobject newElement_2_g; - std::string newElement_2_gClassName = "java/lang/Float"; - std::string newElement_2_gCtorSignature = "(F)V"; - jfloat jninewElement_2_g = static_cast(entry_2.g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_gClassName.c_str(), newElement_2_gCtorSignature.c_str(), jninewElement_2_g, newElement_2_g); - jobject newElement_2_h; - std::string newElement_2_hClassName = "java/lang/Double"; - std::string newElement_2_hCtorSignature = "(D)V"; - jdouble jninewElement_2_h = static_cast(entry_2.h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_hClassName.c_str(), newElement_2_hCtorSignature.c_str(), jninewElement_2_h, newElement_2_h); - - jclass simpleStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_3); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, newElement_2_a, newElement_2_b, newElement_2_c, - newElement_2_d, newElement_2_e, newElement_2_f, newElement_2_g, newElement_2_h); - chip::JniReferences::GetInstance().AddToList(newElement_0_d, newElement_2); - } - jobject newElement_0_e; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_e); - - auto iter_newElement_0_e_2 = entry_0.e.begin(); - while (iter_newElement_0_e_2.Next()) - { - auto & entry_2 = iter_newElement_0_e_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Long"; - std::string newElement_2CtorSignature = "(J)V"; - jlong jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_e, newElement_2); - } - jobject newElement_0_f; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_f); - - auto iter_newElement_0_f_2 = entry_0.f.begin(); - while (iter_newElement_0_f_2.Next()) - { - auto & entry_2 = iter_newElement_0_f_2.GetValue(); - jobject newElement_2; - jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); - env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), - reinterpret_cast(entry_2.data())); - newElement_2 = newElement_2ByteArray; - chip::JniReferences::GetInstance().AddToList(newElement_0_f, newElement_2); - } - jobject newElement_0_g; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_g); - - auto iter_newElement_0_g_2 = entry_0.g.begin(); - while (iter_newElement_0_g_2.Next()) - { - auto & entry_2 = iter_newElement_0_g_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_g, newElement_2); - } - - jclass nestedStructListStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNestedStructList", nestedStructListStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNestedStructList"); - return; - } - - jmethodID nestedStructListStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, nestedStructListStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/" - "ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", - &nestedStructListStructCtor_1); - if (err != CHIP_NO_ERROR || nestedStructListStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNestedStructList constructor"); - return; - } - - newElement_0 = env->NewObject(nestedStructListStructClass_1, nestedStructListStructCtor_1, newElement_0_a, newElement_0_b, - newElement_0_c, newElement_0_d, newElement_0_e, newElement_0_f, newElement_0_g); - chip::JniReferences::GetInstance().AddToList(arg1, newElement_0); - } - jobject arg2; - chip::JniReferences::GetInstance().CreateArrayList(arg2); - - auto iter_arg2_0 = dataResponse.arg2.begin(); - while (iter_arg2_0.Next()) - { - auto & entry_0 = iter_arg2_0.GetValue(); - jobject newElement_0; - jobject newElement_0_a; - std::string newElement_0_aClassName = "java/lang/Integer"; - std::string newElement_0_aCtorSignature = "(I)V"; - jint jninewElement_0_a = static_cast(entry_0.a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), jninewElement_0_a, newElement_0_a); - jobject newElement_0_b; - std::string newElement_0_bClassName = "java/lang/Boolean"; - std::string newElement_0_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_b = static_cast(entry_0.b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), jninewElement_0_b, newElement_0_b); - jobject newElement_0_c; - std::string newElement_0_cClassName = "java/lang/Integer"; - std::string newElement_0_cCtorSignature = "(I)V"; - jint jninewElement_0_c = static_cast(entry_0.c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_cClassName.c_str(), newElement_0_cCtorSignature.c_str(), jninewElement_0_c, newElement_0_c); - jobject newElement_0_d; - jbyteArray newElement_0_dByteArray = env->NewByteArray(static_cast(entry_0.d.size())); - env->SetByteArrayRegion(newElement_0_dByteArray, 0, static_cast(entry_0.d.size()), - reinterpret_cast(entry_0.d.data())); - newElement_0_d = newElement_0_dByteArray; - jobject newElement_0_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.e, newElement_0_e)); - jobject newElement_0_f; - std::string newElement_0_fClassName = "java/lang/Integer"; - std::string newElement_0_fCtorSignature = "(I)V"; - jint jninewElement_0_f = static_cast(entry_0.f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), jninewElement_0_f, newElement_0_f); - jobject newElement_0_g; - std::string newElement_0_gClassName = "java/lang/Float"; - std::string newElement_0_gCtorSignature = "(F)V"; - jfloat jninewElement_0_g = static_cast(entry_0.g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_gClassName.c_str(), newElement_0_gCtorSignature.c_str(), jninewElement_0_g, newElement_0_g); - jobject newElement_0_h; - std::string newElement_0_hClassName = "java/lang/Double"; - std::string newElement_0_hCtorSignature = "(D)V"; - jdouble jninewElement_0_h = static_cast(entry_0.h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), jninewElement_0_h, newElement_0_h); - - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, newElement_0_a, newElement_0_b, newElement_0_c, - newElement_0_d, newElement_0_e, newElement_0_f, newElement_0_g, newElement_0_h); - chip::JniReferences::GetInstance().AddToList(arg2, newElement_0); - } - jobject arg3; - chip::JniReferences::GetInstance().CreateArrayList(arg3); - - auto iter_arg3_0 = dataResponse.arg3.begin(); - while (iter_arg3_0.Next()) - { - auto & entry_0 = iter_arg3_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arg3, newElement_0); - } - jobject arg4; - chip::JniReferences::GetInstance().CreateArrayList(arg4); - - auto iter_arg4_0 = dataResponse.arg4.begin(); - while (iter_arg4_0.Next()) - { - auto & entry_0 = iter_arg4_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Boolean"; - std::string newElement_0CtorSignature = "(Z)V"; - jboolean jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arg4, newElement_0); - } - jobject arg5; - std::string arg5ClassName = "java/lang/Integer"; - std::string arg5CtorSignature = "(I)V"; - jint jniarg5 = static_cast(dataResponse.arg5); - chip::JniReferences::GetInstance().CreateBoxedObject(arg5ClassName.c_str(), arg5CtorSignature.c_str(), jniarg5, arg5); - jobject arg6; - std::string arg6ClassName = "java/lang/Boolean"; - std::string arg6CtorSignature = "(Z)V"; - jboolean jniarg6 = static_cast(dataResponse.arg6); - chip::JniReferences::GetInstance().CreateBoxedObject(arg6ClassName.c_str(), arg6CtorSignature.c_str(), jniarg6, arg6); - - env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2, arg3, arg4, arg5, arg6); -} -CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CHIPUnitTestingClusterTestListInt8UReverseResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::~CHIPUnitTestingClusterTestListInt8UReverseResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject arg1; - chip::JniReferences::GetInstance().CreateArrayList(arg1); - - auto iter_arg1_0 = dataResponse.arg1.begin(); - while (iter_arg1_0.Next()) - { - auto & entry_0 = iter_arg1_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arg1, newElement_0); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, arg1); -} -CHIPUnitTestingClusterTestEnumsResponseCallback::CHIPUnitTestingClusterTestEnumsResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestEnumsResponseCallback::~CHIPUnitTestingClusterTestEnumsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestEnumsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject arg1; - std::string arg1ClassName = "java/lang/Integer"; - std::string arg1CtorSignature = "(I)V"; - jint jniarg1 = static_cast(dataResponse.arg1); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), jniarg1, arg1); - jobject arg2; - std::string arg2ClassName = "java/lang/Integer"; - std::string arg2CtorSignature = "(I)V"; - jint jniarg2 = static_cast(dataResponse.arg2); - chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), jniarg2, arg2); - - env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2); -} -CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CHIPUnitTestingClusterTestNullableOptionalResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestNullableOptionalResponseCallback::~CHIPUnitTestingClusterTestNullableOptionalResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject wasPresent; - std::string wasPresentClassName = "java/lang/Boolean"; - std::string wasPresentCtorSignature = "(Z)V"; - jboolean jniwasPresent = static_cast(dataResponse.wasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(wasPresentClassName.c_str(), wasPresentCtorSignature.c_str(), - jniwasPresent, wasPresent); - jobject wasNull; - if (!dataResponse.wasNull.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, wasNull); - } - else - { - jobject wasNullInsideOptional; - std::string wasNullInsideOptionalClassName = "java/lang/Boolean"; - std::string wasNullInsideOptionalCtorSignature = "(Z)V"; - jboolean jniwasNullInsideOptional = static_cast(dataResponse.wasNull.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(wasNullInsideOptionalClassName.c_str(), - wasNullInsideOptionalCtorSignature.c_str(), - jniwasNullInsideOptional, wasNullInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(wasNullInsideOptional, wasNull); - } - jobject value; - if (!dataResponse.value.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value); - } - else - { - jobject valueInsideOptional; - std::string valueInsideOptionalClassName = "java/lang/Integer"; - std::string valueInsideOptionalCtorSignature = "(I)V"; - jint jnivalueInsideOptional = static_cast(dataResponse.value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueInsideOptionalClassName.c_str(), - valueInsideOptionalCtorSignature.c_str(), jnivalueInsideOptional, - valueInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(valueInsideOptional, value); - } - jobject originalValue; - if (!dataResponse.originalValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, originalValue); - } - else - { - jobject originalValueInsideOptional; - if (dataResponse.originalValue.Value().IsNull()) - { - originalValueInsideOptional = nullptr; - } - else - { - std::string originalValueInsideOptionalClassName = "java/lang/Integer"; - std::string originalValueInsideOptionalCtorSignature = "(I)V"; - jint jnioriginalValueInsideOptional = static_cast(dataResponse.originalValue.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(originalValueInsideOptionalClassName.c_str(), - originalValueInsideOptionalCtorSignature.c_str(), - jnioriginalValueInsideOptional, originalValueInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional(originalValueInsideOptional, originalValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, wasPresent, wasNull, value, originalValue); -} -CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback:: - CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback:: - ~CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/" - "Boolean;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/" - "Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/" - "Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NullableIntWasNull; - std::string NullableIntWasNullClassName = "java/lang/Boolean"; - std::string NullableIntWasNullCtorSignature = "(Z)V"; - jboolean jniNullableIntWasNull = static_cast(dataResponse.nullableIntWasNull); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableIntWasNullClassName.c_str(), NullableIntWasNullCtorSignature.c_str(), jniNullableIntWasNull, NullableIntWasNull); - jobject NullableIntValue; - if (!dataResponse.nullableIntValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableIntValue); - } - else - { - jobject NullableIntValueInsideOptional; - std::string NullableIntValueInsideOptionalClassName = "java/lang/Integer"; - std::string NullableIntValueInsideOptionalCtorSignature = "(I)V"; - jint jniNullableIntValueInsideOptional = static_cast(dataResponse.nullableIntValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableIntValueInsideOptionalClassName.c_str(), NullableIntValueInsideOptionalCtorSignature.c_str(), - jniNullableIntValueInsideOptional, NullableIntValueInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableIntValueInsideOptional, NullableIntValue); - } - jobject OptionalIntWasPresent; - std::string OptionalIntWasPresentClassName = "java/lang/Boolean"; - std::string OptionalIntWasPresentCtorSignature = "(Z)V"; - jboolean jniOptionalIntWasPresent = static_cast(dataResponse.optionalIntWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalIntWasPresentClassName.c_str(), - OptionalIntWasPresentCtorSignature.c_str(), - jniOptionalIntWasPresent, OptionalIntWasPresent); - jobject OptionalIntValue; - if (!dataResponse.optionalIntValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalIntValue); - } - else - { - jobject OptionalIntValueInsideOptional; - std::string OptionalIntValueInsideOptionalClassName = "java/lang/Integer"; - std::string OptionalIntValueInsideOptionalCtorSignature = "(I)V"; - jint jniOptionalIntValueInsideOptional = static_cast(dataResponse.optionalIntValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalIntValueInsideOptionalClassName.c_str(), OptionalIntValueInsideOptionalCtorSignature.c_str(), - jniOptionalIntValueInsideOptional, OptionalIntValueInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(OptionalIntValueInsideOptional, OptionalIntValue); - } - jobject NullableOptionalIntWasPresent; - std::string NullableOptionalIntWasPresentClassName = "java/lang/Boolean"; - std::string NullableOptionalIntWasPresentCtorSignature = "(Z)V"; - jboolean jniNullableOptionalIntWasPresent = static_cast(dataResponse.nullableOptionalIntWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalIntWasPresentClassName.c_str(), - NullableOptionalIntWasPresentCtorSignature.c_str(), - jniNullableOptionalIntWasPresent, NullableOptionalIntWasPresent); - jobject NullableOptionalIntWasNull; - if (!dataResponse.nullableOptionalIntWasNull.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalIntWasNull); - } - else - { - jobject NullableOptionalIntWasNullInsideOptional; - std::string NullableOptionalIntWasNullInsideOptionalClassName = "java/lang/Boolean"; - std::string NullableOptionalIntWasNullInsideOptionalCtorSignature = "(Z)V"; - jboolean jniNullableOptionalIntWasNullInsideOptional = - static_cast(dataResponse.nullableOptionalIntWasNull.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalIntWasNullInsideOptionalClassName.c_str(), - NullableOptionalIntWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalIntWasNullInsideOptional, - NullableOptionalIntWasNullInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntWasNullInsideOptional, NullableOptionalIntWasNull); - } - jobject NullableOptionalIntValue; - if (!dataResponse.nullableOptionalIntValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalIntValue); - } - else - { - jobject NullableOptionalIntValueInsideOptional; - std::string NullableOptionalIntValueInsideOptionalClassName = "java/lang/Integer"; - std::string NullableOptionalIntValueInsideOptionalCtorSignature = "(I)V"; - jint jniNullableOptionalIntValueInsideOptional = static_cast(dataResponse.nullableOptionalIntValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalIntValueInsideOptionalClassName.c_str(), NullableOptionalIntValueInsideOptionalCtorSignature.c_str(), - jniNullableOptionalIntValueInsideOptional, NullableOptionalIntValueInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntValueInsideOptional, NullableOptionalIntValue); - } - jobject NullableStringWasNull; - std::string NullableStringWasNullClassName = "java/lang/Boolean"; - std::string NullableStringWasNullCtorSignature = "(Z)V"; - jboolean jniNullableStringWasNull = static_cast(dataResponse.nullableStringWasNull); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableStringWasNullClassName.c_str(), - NullableStringWasNullCtorSignature.c_str(), - jniNullableStringWasNull, NullableStringWasNull); - jobject NullableStringValue; - if (!dataResponse.nullableStringValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableStringValue); - } - else - { - jobject NullableStringValueInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.nullableStringValue.Value(), - NullableStringValueInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(NullableStringValueInsideOptional, NullableStringValue); - } - jobject OptionalStringWasPresent; - std::string OptionalStringWasPresentClassName = "java/lang/Boolean"; - std::string OptionalStringWasPresentCtorSignature = "(Z)V"; - jboolean jniOptionalStringWasPresent = static_cast(dataResponse.optionalStringWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStringWasPresentClassName.c_str(), - OptionalStringWasPresentCtorSignature.c_str(), - jniOptionalStringWasPresent, OptionalStringWasPresent); - jobject OptionalStringValue; - if (!dataResponse.optionalStringValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalStringValue); - } - else - { - jobject OptionalStringValueInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.optionalStringValue.Value(), - OptionalStringValueInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(OptionalStringValueInsideOptional, OptionalStringValue); - } - jobject NullableOptionalStringWasPresent; - std::string NullableOptionalStringWasPresentClassName = "java/lang/Boolean"; - std::string NullableOptionalStringWasPresentCtorSignature = "(Z)V"; - jboolean jniNullableOptionalStringWasPresent = static_cast(dataResponse.nullableOptionalStringWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStringWasPresentClassName.c_str(), NullableOptionalStringWasPresentCtorSignature.c_str(), - jniNullableOptionalStringWasPresent, NullableOptionalStringWasPresent); - jobject NullableOptionalStringWasNull; - if (!dataResponse.nullableOptionalStringWasNull.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStringWasNull); - } - else - { - jobject NullableOptionalStringWasNullInsideOptional; - std::string NullableOptionalStringWasNullInsideOptionalClassName = "java/lang/Boolean"; - std::string NullableOptionalStringWasNullInsideOptionalCtorSignature = "(Z)V"; - jboolean jniNullableOptionalStringWasNullInsideOptional = - static_cast(dataResponse.nullableOptionalStringWasNull.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStringWasNullInsideOptionalClassName.c_str(), - NullableOptionalStringWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalStringWasNullInsideOptional, - NullableOptionalStringWasNullInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStringWasNullInsideOptional, - NullableOptionalStringWasNull); - } - jobject NullableOptionalStringValue; - if (!dataResponse.nullableOptionalStringValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStringValue); - } - else - { - jobject NullableOptionalStringValueInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.nullableOptionalStringValue.Value(), - NullableOptionalStringValueInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStringValueInsideOptional, NullableOptionalStringValue); - } - jobject NullableStructWasNull; - std::string NullableStructWasNullClassName = "java/lang/Boolean"; - std::string NullableStructWasNullCtorSignature = "(Z)V"; - jboolean jniNullableStructWasNull = static_cast(dataResponse.nullableStructWasNull); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableStructWasNullClassName.c_str(), - NullableStructWasNullCtorSignature.c_str(), - jniNullableStructWasNull, NullableStructWasNull); - jobject NullableStructValue; - if (!dataResponse.nullableStructValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableStructValue); - } - else - { - jobject NullableStructValueInsideOptional; - jobject NullableStructValueInsideOptional_a; - std::string NullableStructValueInsideOptional_aClassName = "java/lang/Integer"; - std::string NullableStructValueInsideOptional_aCtorSignature = "(I)V"; - jint jniNullableStructValueInsideOptional_a = static_cast(dataResponse.nullableStructValue.Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_aClassName.c_str(), NullableStructValueInsideOptional_aCtorSignature.c_str(), - jniNullableStructValueInsideOptional_a, NullableStructValueInsideOptional_a); - jobject NullableStructValueInsideOptional_b; - std::string NullableStructValueInsideOptional_bClassName = "java/lang/Boolean"; - std::string NullableStructValueInsideOptional_bCtorSignature = "(Z)V"; - jboolean jniNullableStructValueInsideOptional_b = static_cast(dataResponse.nullableStructValue.Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_bClassName.c_str(), NullableStructValueInsideOptional_bCtorSignature.c_str(), - jniNullableStructValueInsideOptional_b, NullableStructValueInsideOptional_b); - jobject NullableStructValueInsideOptional_c; - std::string NullableStructValueInsideOptional_cClassName = "java/lang/Integer"; - std::string NullableStructValueInsideOptional_cCtorSignature = "(I)V"; - jint jniNullableStructValueInsideOptional_c = static_cast(dataResponse.nullableStructValue.Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_cClassName.c_str(), NullableStructValueInsideOptional_cCtorSignature.c_str(), - jniNullableStructValueInsideOptional_c, NullableStructValueInsideOptional_c); - jobject NullableStructValueInsideOptional_d; - jbyteArray NullableStructValueInsideOptional_dByteArray = - env->NewByteArray(static_cast(dataResponse.nullableStructValue.Value().d.size())); - env->SetByteArrayRegion(NullableStructValueInsideOptional_dByteArray, 0, - static_cast(dataResponse.nullableStructValue.Value().d.size()), - reinterpret_cast(dataResponse.nullableStructValue.Value().d.data())); - NullableStructValueInsideOptional_d = NullableStructValueInsideOptional_dByteArray; - jobject NullableStructValueInsideOptional_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.nullableStructValue.Value().e, - NullableStructValueInsideOptional_e)); - jobject NullableStructValueInsideOptional_f; - std::string NullableStructValueInsideOptional_fClassName = "java/lang/Integer"; - std::string NullableStructValueInsideOptional_fCtorSignature = "(I)V"; - jint jniNullableStructValueInsideOptional_f = static_cast(dataResponse.nullableStructValue.Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_fClassName.c_str(), NullableStructValueInsideOptional_fCtorSignature.c_str(), - jniNullableStructValueInsideOptional_f, NullableStructValueInsideOptional_f); - jobject NullableStructValueInsideOptional_g; - std::string NullableStructValueInsideOptional_gClassName = "java/lang/Float"; - std::string NullableStructValueInsideOptional_gCtorSignature = "(F)V"; - jfloat jniNullableStructValueInsideOptional_g = static_cast(dataResponse.nullableStructValue.Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_gClassName.c_str(), NullableStructValueInsideOptional_gCtorSignature.c_str(), - jniNullableStructValueInsideOptional_g, NullableStructValueInsideOptional_g); - jobject NullableStructValueInsideOptional_h; - std::string NullableStructValueInsideOptional_hClassName = "java/lang/Double"; - std::string NullableStructValueInsideOptional_hCtorSignature = "(D)V"; - jdouble jniNullableStructValueInsideOptional_h = static_cast(dataResponse.nullableStructValue.Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableStructValueInsideOptional_hClassName.c_str(), NullableStructValueInsideOptional_hCtorSignature.c_str(), - jniNullableStructValueInsideOptional_h, NullableStructValueInsideOptional_h); - - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - NullableStructValueInsideOptional = env->NewObject( - simpleStructStructClass_1, simpleStructStructCtor_1, NullableStructValueInsideOptional_a, - NullableStructValueInsideOptional_b, NullableStructValueInsideOptional_c, NullableStructValueInsideOptional_d, - NullableStructValueInsideOptional_e, NullableStructValueInsideOptional_f, NullableStructValueInsideOptional_g, - NullableStructValueInsideOptional_h); - chip::JniReferences::GetInstance().CreateOptional(NullableStructValueInsideOptional, NullableStructValue); - } - jobject OptionalStructWasPresent; - std::string OptionalStructWasPresentClassName = "java/lang/Boolean"; - std::string OptionalStructWasPresentCtorSignature = "(Z)V"; - jboolean jniOptionalStructWasPresent = static_cast(dataResponse.optionalStructWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStructWasPresentClassName.c_str(), - OptionalStructWasPresentCtorSignature.c_str(), - jniOptionalStructWasPresent, OptionalStructWasPresent); - jobject OptionalStructValue; - if (!dataResponse.optionalStructValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalStructValue); - } - else - { - jobject OptionalStructValueInsideOptional; - jobject OptionalStructValueInsideOptional_a; - std::string OptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; - std::string OptionalStructValueInsideOptional_aCtorSignature = "(I)V"; - jint jniOptionalStructValueInsideOptional_a = static_cast(dataResponse.optionalStructValue.Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_aClassName.c_str(), OptionalStructValueInsideOptional_aCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_a, OptionalStructValueInsideOptional_a); - jobject OptionalStructValueInsideOptional_b; - std::string OptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; - std::string OptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; - jboolean jniOptionalStructValueInsideOptional_b = static_cast(dataResponse.optionalStructValue.Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_bClassName.c_str(), OptionalStructValueInsideOptional_bCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_b, OptionalStructValueInsideOptional_b); - jobject OptionalStructValueInsideOptional_c; - std::string OptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; - std::string OptionalStructValueInsideOptional_cCtorSignature = "(I)V"; - jint jniOptionalStructValueInsideOptional_c = static_cast(dataResponse.optionalStructValue.Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_cClassName.c_str(), OptionalStructValueInsideOptional_cCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_c, OptionalStructValueInsideOptional_c); - jobject OptionalStructValueInsideOptional_d; - jbyteArray OptionalStructValueInsideOptional_dByteArray = - env->NewByteArray(static_cast(dataResponse.optionalStructValue.Value().d.size())); - env->SetByteArrayRegion(OptionalStructValueInsideOptional_dByteArray, 0, - static_cast(dataResponse.optionalStructValue.Value().d.size()), - reinterpret_cast(dataResponse.optionalStructValue.Value().d.data())); - OptionalStructValueInsideOptional_d = OptionalStructValueInsideOptional_dByteArray; - jobject OptionalStructValueInsideOptional_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.optionalStructValue.Value().e, - OptionalStructValueInsideOptional_e)); - jobject OptionalStructValueInsideOptional_f; - std::string OptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; - std::string OptionalStructValueInsideOptional_fCtorSignature = "(I)V"; - jint jniOptionalStructValueInsideOptional_f = static_cast(dataResponse.optionalStructValue.Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_fClassName.c_str(), OptionalStructValueInsideOptional_fCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_f, OptionalStructValueInsideOptional_f); - jobject OptionalStructValueInsideOptional_g; - std::string OptionalStructValueInsideOptional_gClassName = "java/lang/Float"; - std::string OptionalStructValueInsideOptional_gCtorSignature = "(F)V"; - jfloat jniOptionalStructValueInsideOptional_g = static_cast(dataResponse.optionalStructValue.Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_gClassName.c_str(), OptionalStructValueInsideOptional_gCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_g, OptionalStructValueInsideOptional_g); - jobject OptionalStructValueInsideOptional_h; - std::string OptionalStructValueInsideOptional_hClassName = "java/lang/Double"; - std::string OptionalStructValueInsideOptional_hCtorSignature = "(D)V"; - jdouble jniOptionalStructValueInsideOptional_h = static_cast(dataResponse.optionalStructValue.Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - OptionalStructValueInsideOptional_hClassName.c_str(), OptionalStructValueInsideOptional_hCtorSignature.c_str(), - jniOptionalStructValueInsideOptional_h, OptionalStructValueInsideOptional_h); - - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - OptionalStructValueInsideOptional = env->NewObject( - simpleStructStructClass_1, simpleStructStructCtor_1, OptionalStructValueInsideOptional_a, - OptionalStructValueInsideOptional_b, OptionalStructValueInsideOptional_c, OptionalStructValueInsideOptional_d, - OptionalStructValueInsideOptional_e, OptionalStructValueInsideOptional_f, OptionalStructValueInsideOptional_g, - OptionalStructValueInsideOptional_h); - chip::JniReferences::GetInstance().CreateOptional(OptionalStructValueInsideOptional, OptionalStructValue); - } - jobject NullableOptionalStructWasPresent; - std::string NullableOptionalStructWasPresentClassName = "java/lang/Boolean"; - std::string NullableOptionalStructWasPresentCtorSignature = "(Z)V"; - jboolean jniNullableOptionalStructWasPresent = static_cast(dataResponse.nullableOptionalStructWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructWasPresentClassName.c_str(), NullableOptionalStructWasPresentCtorSignature.c_str(), - jniNullableOptionalStructWasPresent, NullableOptionalStructWasPresent); - jobject NullableOptionalStructWasNull; - if (!dataResponse.nullableOptionalStructWasNull.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStructWasNull); - } - else - { - jobject NullableOptionalStructWasNullInsideOptional; - std::string NullableOptionalStructWasNullInsideOptionalClassName = "java/lang/Boolean"; - std::string NullableOptionalStructWasNullInsideOptionalCtorSignature = "(Z)V"; - jboolean jniNullableOptionalStructWasNullInsideOptional = - static_cast(dataResponse.nullableOptionalStructWasNull.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructWasNullInsideOptionalClassName.c_str(), - NullableOptionalStructWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalStructWasNullInsideOptional, - NullableOptionalStructWasNullInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStructWasNullInsideOptional, - NullableOptionalStructWasNull); - } - jobject NullableOptionalStructValue; - if (!dataResponse.nullableOptionalStructValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStructValue); - } - else - { - jobject NullableOptionalStructValueInsideOptional; - jobject NullableOptionalStructValueInsideOptional_a; - std::string NullableOptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; - std::string NullableOptionalStructValueInsideOptional_aCtorSignature = "(I)V"; - jint jniNullableOptionalStructValueInsideOptional_a = static_cast(dataResponse.nullableOptionalStructValue.Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_aClassName.c_str(), - NullableOptionalStructValueInsideOptional_aCtorSignature.c_str(), - jniNullableOptionalStructValueInsideOptional_a, - NullableOptionalStructValueInsideOptional_a); - jobject NullableOptionalStructValueInsideOptional_b; - std::string NullableOptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; - std::string NullableOptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; - jboolean jniNullableOptionalStructValueInsideOptional_b = - static_cast(dataResponse.nullableOptionalStructValue.Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_bClassName.c_str(), - NullableOptionalStructValueInsideOptional_bCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_b, - NullableOptionalStructValueInsideOptional_b); - jobject NullableOptionalStructValueInsideOptional_c; - std::string NullableOptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; - std::string NullableOptionalStructValueInsideOptional_cCtorSignature = "(I)V"; - jint jniNullableOptionalStructValueInsideOptional_c = static_cast(dataResponse.nullableOptionalStructValue.Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_cClassName.c_str(), - NullableOptionalStructValueInsideOptional_cCtorSignature.c_str(), - jniNullableOptionalStructValueInsideOptional_c, - NullableOptionalStructValueInsideOptional_c); - jobject NullableOptionalStructValueInsideOptional_d; - jbyteArray NullableOptionalStructValueInsideOptional_dByteArray = - env->NewByteArray(static_cast(dataResponse.nullableOptionalStructValue.Value().d.size())); - env->SetByteArrayRegion(NullableOptionalStructValueInsideOptional_dByteArray, 0, - static_cast(dataResponse.nullableOptionalStructValue.Value().d.size()), - reinterpret_cast(dataResponse.nullableOptionalStructValue.Value().d.data())); - NullableOptionalStructValueInsideOptional_d = NullableOptionalStructValueInsideOptional_dByteArray; - jobject NullableOptionalStructValueInsideOptional_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.nullableOptionalStructValue.Value().e, - NullableOptionalStructValueInsideOptional_e)); - jobject NullableOptionalStructValueInsideOptional_f; - std::string NullableOptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; - std::string NullableOptionalStructValueInsideOptional_fCtorSignature = "(I)V"; - jint jniNullableOptionalStructValueInsideOptional_f = - static_cast(dataResponse.nullableOptionalStructValue.Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_fClassName.c_str(), - NullableOptionalStructValueInsideOptional_fCtorSignature.c_str(), - jniNullableOptionalStructValueInsideOptional_f, - NullableOptionalStructValueInsideOptional_f); - jobject NullableOptionalStructValueInsideOptional_g; - std::string NullableOptionalStructValueInsideOptional_gClassName = "java/lang/Float"; - std::string NullableOptionalStructValueInsideOptional_gCtorSignature = "(F)V"; - jfloat jniNullableOptionalStructValueInsideOptional_g = - static_cast(dataResponse.nullableOptionalStructValue.Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_gClassName.c_str(), - NullableOptionalStructValueInsideOptional_gCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_g, - NullableOptionalStructValueInsideOptional_g); - jobject NullableOptionalStructValueInsideOptional_h; - std::string NullableOptionalStructValueInsideOptional_hClassName = "java/lang/Double"; - std::string NullableOptionalStructValueInsideOptional_hCtorSignature = "(D)V"; - jdouble jniNullableOptionalStructValueInsideOptional_h = - static_cast(dataResponse.nullableOptionalStructValue.Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_hClassName.c_str(), - NullableOptionalStructValueInsideOptional_hCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_h, - NullableOptionalStructValueInsideOptional_h); - - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - NullableOptionalStructValueInsideOptional = - env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, NullableOptionalStructValueInsideOptional_a, - NullableOptionalStructValueInsideOptional_b, NullableOptionalStructValueInsideOptional_c, - NullableOptionalStructValueInsideOptional_d, NullableOptionalStructValueInsideOptional_e, - NullableOptionalStructValueInsideOptional_f, NullableOptionalStructValueInsideOptional_g, - NullableOptionalStructValueInsideOptional_h); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStructValueInsideOptional, NullableOptionalStructValue); - } - jobject NullableListWasNull; - std::string NullableListWasNullClassName = "java/lang/Boolean"; - std::string NullableListWasNullCtorSignature = "(Z)V"; - jboolean jniNullableListWasNull = static_cast(dataResponse.nullableListWasNull); - chip::JniReferences::GetInstance().CreateBoxedObject(NullableListWasNullClassName.c_str(), - NullableListWasNullCtorSignature.c_str(), jniNullableListWasNull, - NullableListWasNull); - jobject NullableListValue; - if (!dataResponse.nullableListValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableListValue); - } - else - { - jobject NullableListValueInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(NullableListValueInsideOptional); - - auto iter_NullableListValueInsideOptional_1 = dataResponse.nullableListValue.Value().begin(); - while (iter_NullableListValueInsideOptional_1.Next()) - { - auto & entry_1 = iter_NullableListValueInsideOptional_1.GetValue(); - jobject newElement_1; - std::string newElement_1ClassName = "java/lang/Integer"; - std::string newElement_1CtorSignature = "(I)V"; - jint jninewElement_1 = static_cast(entry_1); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); - chip::JniReferences::GetInstance().AddToList(NullableListValueInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(NullableListValueInsideOptional, NullableListValue); - } - jobject OptionalListWasPresent; - std::string OptionalListWasPresentClassName = "java/lang/Boolean"; - std::string OptionalListWasPresentCtorSignature = "(Z)V"; - jboolean jniOptionalListWasPresent = static_cast(dataResponse.optionalListWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalListWasPresentClassName.c_str(), - OptionalListWasPresentCtorSignature.c_str(), - jniOptionalListWasPresent, OptionalListWasPresent); - jobject OptionalListValue; - if (!dataResponse.optionalListValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalListValue); - } - else - { - jobject OptionalListValueInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(OptionalListValueInsideOptional); - - auto iter_OptionalListValueInsideOptional_1 = dataResponse.optionalListValue.Value().begin(); - while (iter_OptionalListValueInsideOptional_1.Next()) - { - auto & entry_1 = iter_OptionalListValueInsideOptional_1.GetValue(); - jobject newElement_1; - std::string newElement_1ClassName = "java/lang/Integer"; - std::string newElement_1CtorSignature = "(I)V"; - jint jninewElement_1 = static_cast(entry_1); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); - chip::JniReferences::GetInstance().AddToList(OptionalListValueInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(OptionalListValueInsideOptional, OptionalListValue); - } - jobject NullableOptionalListWasPresent; - std::string NullableOptionalListWasPresentClassName = "java/lang/Boolean"; - std::string NullableOptionalListWasPresentCtorSignature = "(Z)V"; - jboolean jniNullableOptionalListWasPresent = static_cast(dataResponse.nullableOptionalListWasPresent); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalListWasPresentClassName.c_str(), NullableOptionalListWasPresentCtorSignature.c_str(), - jniNullableOptionalListWasPresent, NullableOptionalListWasPresent); - jobject NullableOptionalListWasNull; - if (!dataResponse.nullableOptionalListWasNull.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalListWasNull); - } - else - { - jobject NullableOptionalListWasNullInsideOptional; - std::string NullableOptionalListWasNullInsideOptionalClassName = "java/lang/Boolean"; - std::string NullableOptionalListWasNullInsideOptionalCtorSignature = "(Z)V"; - jboolean jniNullableOptionalListWasNullInsideOptional = - static_cast(dataResponse.nullableOptionalListWasNull.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalListWasNullInsideOptionalClassName.c_str(), - NullableOptionalListWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalListWasNullInsideOptional, - NullableOptionalListWasNullInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListWasNullInsideOptional, NullableOptionalListWasNull); - } - jobject NullableOptionalListValue; - if (!dataResponse.nullableOptionalListValue.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalListValue); - } - else - { - jobject NullableOptionalListValueInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(NullableOptionalListValueInsideOptional); - - auto iter_NullableOptionalListValueInsideOptional_1 = dataResponse.nullableOptionalListValue.Value().begin(); - while (iter_NullableOptionalListValueInsideOptional_1.Next()) - { - auto & entry_1 = iter_NullableOptionalListValueInsideOptional_1.GetValue(); - jobject newElement_1; - std::string newElement_1ClassName = "java/lang/Integer"; - std::string newElement_1CtorSignature = "(I)V"; - jint jninewElement_1 = static_cast(entry_1); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); - chip::JniReferences::GetInstance().AddToList(NullableOptionalListValueInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListValueInsideOptional, NullableOptionalListValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, NullableIntWasNull, NullableIntValue, OptionalIntWasPresent, OptionalIntValue, - NullableOptionalIntWasPresent, NullableOptionalIntWasNull, NullableOptionalIntValue, NullableStringWasNull, - NullableStringValue, OptionalStringWasPresent, OptionalStringValue, NullableOptionalStringWasPresent, - NullableOptionalStringWasNull, NullableOptionalStringValue, NullableStructWasNull, NullableStructValue, - OptionalStructWasPresent, OptionalStructValue, NullableOptionalStructWasPresent, - NullableOptionalStructWasNull, NullableOptionalStructValue, NullableListWasNull, NullableListValue, - OptionalListWasPresent, OptionalListValue, NullableOptionalListWasPresent, NullableOptionalListWasNull, - NullableOptionalListValue); -} -CHIPUnitTestingClusterBooleanResponseCallback::CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterBooleanResponseCallback::~CHIPUnitTestingClusterBooleanResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterBooleanResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(dataResponse.value); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - - env->CallVoidMethod(javaCallbackRef, javaMethod, value); -} -CHIPUnitTestingClusterSimpleStructResponseCallback::CHIPUnitTestingClusterSimpleStructResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterSimpleStructResponseCallback::~CHIPUnitTestingClusterSimpleStructResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterSimpleStructResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject arg1; - jobject arg1_a; - std::string arg1_aClassName = "java/lang/Integer"; - std::string arg1_aCtorSignature = "(I)V"; - jint jniarg1_a = static_cast(dataResponse.arg1.a); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_aClassName.c_str(), arg1_aCtorSignature.c_str(), jniarg1_a, - arg1_a); - jobject arg1_b; - std::string arg1_bClassName = "java/lang/Boolean"; - std::string arg1_bCtorSignature = "(Z)V"; - jboolean jniarg1_b = static_cast(dataResponse.arg1.b); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_bClassName.c_str(), arg1_bCtorSignature.c_str(), jniarg1_b, - arg1_b); - jobject arg1_c; - std::string arg1_cClassName = "java/lang/Integer"; - std::string arg1_cCtorSignature = "(I)V"; - jint jniarg1_c = static_cast(dataResponse.arg1.c); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_cClassName.c_str(), arg1_cCtorSignature.c_str(), jniarg1_c, - arg1_c); - jobject arg1_d; - jbyteArray arg1_dByteArray = env->NewByteArray(static_cast(dataResponse.arg1.d.size())); - env->SetByteArrayRegion(arg1_dByteArray, 0, static_cast(dataResponse.arg1.d.size()), - reinterpret_cast(dataResponse.arg1.d.data())); - arg1_d = arg1_dByteArray; - jobject arg1_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.arg1.e, arg1_e)); - jobject arg1_f; - std::string arg1_fClassName = "java/lang/Integer"; - std::string arg1_fCtorSignature = "(I)V"; - jint jniarg1_f = static_cast(dataResponse.arg1.f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_fClassName.c_str(), arg1_fCtorSignature.c_str(), jniarg1_f, - arg1_f); - jobject arg1_g; - std::string arg1_gClassName = "java/lang/Float"; - std::string arg1_gCtorSignature = "(F)V"; - jfloat jniarg1_g = static_cast(dataResponse.arg1.g); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_gClassName.c_str(), arg1_gCtorSignature.c_str(), jniarg1_g, - arg1_g); - jobject arg1_h; - std::string arg1_hClassName = "java/lang/Double"; - std::string arg1_hCtorSignature = "(D)V"; - jdouble jniarg1_h = static_cast(dataResponse.arg1.h); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_hClassName.c_str(), arg1_hCtorSignature.c_str(), jniarg1_h, - arg1_h); - - jclass simpleStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", - simpleStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/" - "String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_0); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - arg1 = env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, arg1_a, arg1_b, arg1_c, arg1_d, arg1_e, arg1_f, - arg1_g, arg1_h); - - env->CallVoidMethod(javaCallbackRef, javaMethod, arg1); -} -CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CHIPUnitTestingClusterTestEmitTestEventResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestEmitTestEventResponseCallback::~CHIPUnitTestingClusterTestEmitTestEventResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(dataResponse.value); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - - env->CallVoidMethod(javaCallbackRef, javaMethod, value); -} -CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback:: - CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback:: - ~CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(dataResponse.value); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - - env->CallVoidMethod(javaCallbackRef, javaMethod, value); -} -CHIPUnitTestingClusterTestBatchHelperResponseCallback::CHIPUnitTestingClusterTestBatchHelperResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestBatchHelperResponseCallback::~CHIPUnitTestingClusterTestBatchHelperResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestBatchHelperResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestBatchHelperResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject buffer; - jbyteArray bufferByteArray = env->NewByteArray(static_cast(dataResponse.buffer.size())); - env->SetByteArrayRegion(bufferByteArray, 0, static_cast(dataResponse.buffer.size()), - reinterpret_cast(dataResponse.buffer.data())); - buffer = bufferByteArray; - - env->CallVoidMethod(javaCallbackRef, javaMethod, buffer); -} -CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::~CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject arg1; - std::string arg1ClassName = "java/lang/Integer"; - std::string arg1CtorSignature = "(I)V"; - jint jniarg1 = static_cast(dataResponse.arg1); - chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), jniarg1, arg1); - jobject eventNumber; - std::string eventNumberClassName = "java/lang/Long"; - std::string eventNumberCtorSignature = "(J)V"; - jlong jnieventNumber = static_cast(dataResponse.eventNumber); - chip::JniReferences::GetInstance().CreateBoxedObject(eventNumberClassName.c_str(), eventNumberCtorSignature.c_str(), - jnieventNumber, eventNumber); - - env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, eventNumber); -} -CHIPSampleMeiClusterAddArgumentsResponseCallback::CHIPSampleMeiClusterAddArgumentsResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSampleMeiClusterAddArgumentsResponseCallback::~CHIPSampleMeiClusterAddArgumentsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPSampleMeiClusterAddArgumentsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::SampleMei::Commands::AddArgumentsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; - std::string returnValueCtorSignature = "(I)V"; - jint jnireturnValue = static_cast(dataResponse.returnValue); - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - jnireturnValue, returnValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); -} -} // namespace chip diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h deleted file mode 100644 index 53212aa8617211..00000000000000 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ /dev/null @@ -1,1185 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#include - -#include -#include -#include - -namespace chip { - -class CHIPGroupsClusterAddGroupResponseCallback : public Callback::Callback -{ -public: - CHIPGroupsClusterAddGroupResponseCallback(jobject javaCallback); - - ~CHIPGroupsClusterAddGroupResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGroupsClusterViewGroupResponseCallback : public Callback::Callback -{ -public: - CHIPGroupsClusterViewGroupResponseCallback(jobject javaCallback); - - ~CHIPGroupsClusterViewGroupResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGroupsClusterGetGroupMembershipResponseCallback - : public Callback::Callback -{ -public: - CHIPGroupsClusterGetGroupMembershipResponseCallback(jobject javaCallback); - - ~CHIPGroupsClusterGetGroupMembershipResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGroupsClusterRemoveGroupResponseCallback : public Callback::Callback -{ -public: - CHIPGroupsClusterRemoveGroupResponseCallback(jobject javaCallback); - - ~CHIPGroupsClusterRemoveGroupResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback - : public Callback::Callback -{ -public: - CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback(jobject javaCallback); - - ~CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback - : public Callback::Callback -{ -public: - CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(jobject javaCallback); - - ~CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGeneralCommissioningClusterArmFailSafeResponseCallback - : public Callback::Callback -{ -public: - CHIPGeneralCommissioningClusterArmFailSafeResponseCallback(jobject javaCallback); - - ~CHIPGeneralCommissioningClusterArmFailSafeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback - : public Callback::Callback -{ -public: - CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback); - - ~CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback - : public Callback::Callback -{ -public: - CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback); - - ~CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPNetworkCommissioningClusterScanNetworksResponseCallback - : public Callback::Callback -{ -public: - CHIPNetworkCommissioningClusterScanNetworksResponseCallback(jobject javaCallback); - - ~CHIPNetworkCommissioningClusterScanNetworksResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPNetworkCommissioningClusterNetworkConfigResponseCallback - : public Callback::Callback -{ -public: - CHIPNetworkCommissioningClusterNetworkConfigResponseCallback(jobject javaCallback); - - ~CHIPNetworkCommissioningClusterNetworkConfigResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPNetworkCommissioningClusterConnectNetworkResponseCallback - : public Callback::Callback -{ -public: - CHIPNetworkCommissioningClusterConnectNetworkResponseCallback(jobject javaCallback); - - ~CHIPNetworkCommissioningClusterConnectNetworkResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPNetworkCommissioningClusterQueryIdentityResponseCallback - : public Callback::Callback -{ -public: - CHIPNetworkCommissioningClusterQueryIdentityResponseCallback(jobject javaCallback); - - ~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback - : public Callback::Callback -{ -public: - CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback); - - ~CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback - : public Callback::Callback -{ -public: - CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback(jobject javaCallback); - - ~CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback - : public Callback::Callback -{ -public: - CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback(jobject javaCallback); - - ~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOperationalCredentialsClusterAttestationResponseCallback - : public Callback::Callback -{ -public: - CHIPOperationalCredentialsClusterAttestationResponseCallback(jobject javaCallback); - - ~CHIPOperationalCredentialsClusterAttestationResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOperationalCredentialsClusterCertificateChainResponseCallback - : public Callback::Callback -{ -public: - CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback); - - ~CHIPOperationalCredentialsClusterCertificateChainResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOperationalCredentialsClusterCSRResponseCallback - : public Callback::Callback -{ -public: - CHIPOperationalCredentialsClusterCSRResponseCallback(jobject javaCallback); - - ~CHIPOperationalCredentialsClusterCSRResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOperationalCredentialsClusterNOCResponseCallback - : public Callback::Callback -{ -public: - CHIPOperationalCredentialsClusterNOCResponseCallback(jobject javaCallback); - - ~CHIPOperationalCredentialsClusterNOCResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGroupKeyManagementClusterKeySetReadResponseCallback - : public Callback::Callback -{ -public: - CHIPGroupKeyManagementClusterKeySetReadResponseCallback(jobject javaCallback); - - ~CHIPGroupKeyManagementClusterKeySetReadResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback - : public Callback::Callback -{ -public: - CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(jobject javaCallback); - - ~CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPIcdManagementClusterRegisterClientResponseCallback - : public Callback::Callback -{ -public: - CHIPIcdManagementClusterRegisterClientResponseCallback(jobject javaCallback); - - ~CHIPIcdManagementClusterRegisterClientResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPIcdManagementClusterStayActiveResponseCallback - : public Callback::Callback -{ -public: - CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback); - - ~CHIPIcdManagementClusterStayActiveResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback - : public Callback::Callback -{ -public: - CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback); - - ~CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOvenModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPOvenModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPLaundryWasherModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPLaundryWasherModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPLaundryWasherModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback(); - - static void CallbackFn( - void * context, - const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & - data); - -private: - jobject javaCallbackRef; -}; - -class CHIPRvcRunModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPRvcRunModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPRvcRunModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPRvcCleanModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPRvcCleanModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPRvcCleanModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDishwasherModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPDishwasherModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPDishwasherModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPOperationalStateClusterOperationalCommandResponseCallback - : public Callback::Callback -{ -public: - CHIPOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback); - - ~CHIPOperationalStateClusterOperationalCommandResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPRvcOperationalStateClusterOperationalCommandResponseCallback - : public Callback::Callback -{ -public: - CHIPRvcOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback); - - ~CHIPRvcOperationalStateClusterOperationalCommandResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterAddSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterAddSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterAddSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterViewSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterViewSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterViewSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterRemoveSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterRemoveSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterRemoveSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterRemoveAllScenesResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterRemoveAllScenesResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterRemoveAllScenesResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterStoreSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterStoreSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterStoreSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterGetSceneMembershipResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterGetSceneMembershipResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterGetSceneMembershipResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesManagementClusterCopySceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesManagementClusterCopySceneResponseCallback(jobject javaCallback); - - ~CHIPScenesManagementClusterCopySceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPEnergyEvseClusterGetTargetsResponseCallback - : public Callback::Callback -{ -public: - CHIPEnergyEvseClusterGetTargetsResponseCallback(jobject javaCallback); - - ~CHIPEnergyEvseClusterGetTargetsResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPEnergyEvseModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPEnergyEvseModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPEnergyEvseModeClusterChangeToModeResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback - : public Callback::Callback -{ -public: - CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback(jobject javaCallback); - - ~CHIPDeviceEnergyManagementModeClusterChangeToModeResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterGetWeekDayScheduleResponseCallback - : public Callback::Callback -{ -public: - CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterGetYearDayScheduleResponseCallback - : public Callback::Callback -{ -public: - CHIPDoorLockClusterGetYearDayScheduleResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterGetYearDayScheduleResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterGetHolidayScheduleResponseCallback - : public Callback::Callback -{ -public: - CHIPDoorLockClusterGetHolidayScheduleResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterGetHolidayScheduleResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterGetUserResponseCallback : public Callback::Callback -{ -public: - CHIPDoorLockClusterGetUserResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterGetUserResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterSetCredentialResponseCallback - : public Callback::Callback -{ -public: - CHIPDoorLockClusterSetCredentialResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterSetCredentialResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPDoorLockClusterGetCredentialStatusResponseCallback - : public Callback::Callback -{ -public: - CHIPDoorLockClusterGetCredentialStatusResponseCallback(jobject javaCallback); - - ~CHIPDoorLockClusterGetCredentialStatusResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPThermostatClusterGetWeeklyScheduleResponseCallback - : public Callback::Callback -{ -public: - CHIPThermostatClusterGetWeeklyScheduleResponseCallback(jobject javaCallback); - - ~CHIPThermostatClusterGetWeeklyScheduleResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPChannelClusterChangeChannelResponseCallback - : public Callback::Callback -{ -public: - CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback); - - ~CHIPChannelClusterChangeChannelResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPChannelClusterProgramGuideResponseCallback : public Callback::Callback -{ -public: - CHIPChannelClusterProgramGuideResponseCallback(jobject javaCallback); - - ~CHIPChannelClusterProgramGuideResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPTargetNavigatorClusterNavigateTargetResponseCallback - : public Callback::Callback -{ -public: - CHIPTargetNavigatorClusterNavigateTargetResponseCallback(jobject javaCallback); - - ~CHIPTargetNavigatorClusterNavigateTargetResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPMediaPlaybackClusterPlaybackResponseCallback - : public Callback::Callback -{ -public: - CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback); - - ~CHIPMediaPlaybackClusterPlaybackResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPKeypadInputClusterSendKeyResponseCallback : public Callback::Callback -{ -public: - CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback); - - ~CHIPKeypadInputClusterSendKeyResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPContentLauncherClusterLauncherResponseCallback - : public Callback::Callback -{ -public: - CHIPContentLauncherClusterLauncherResponseCallback(jobject javaCallback); - - ~CHIPContentLauncherClusterLauncherResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPApplicationLauncherClusterLauncherResponseCallback - : public Callback::Callback -{ -public: - CHIPApplicationLauncherClusterLauncherResponseCallback(jobject javaCallback); - - ~CHIPApplicationLauncherClusterLauncherResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPAccountLoginClusterGetSetupPINResponseCallback - : public Callback::Callback -{ -public: - CHIPAccountLoginClusterGetSetupPINResponseCallback(jobject javaCallback); - - ~CHIPAccountLoginClusterGetSetupPINResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPContentControlClusterResetPINResponseCallback - : public Callback::Callback -{ -public: - CHIPContentControlClusterResetPINResponseCallback(jobject javaCallback); - - ~CHIPContentControlClusterResetPINResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPContentAppObserverClusterContentAppMessageResponseCallback - : public Callback::Callback -{ -public: - CHIPContentAppObserverClusterContentAppMessageResponseCallback(jobject javaCallback); - - ~CHIPContentAppObserverClusterContentAppMessageResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback - : public Callback::Callback -{ -public: - CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(jobject javaCallback); - - ~CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback - : public Callback::Callback -{ -public: - CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(jobject javaCallback); - - ~CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(); - - static void CallbackFn( - void * context, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestSpecificResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestSpecificResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestAddArgumentsResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestAddArgumentsResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestAddArgumentsResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestSimpleArgumentResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestSimpleArgumentResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestSimpleArgumentResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestListInt8UReverseResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestListInt8UReverseResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestListInt8UReverseResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestEnumsResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestEnumsResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestEnumsResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestNullableOptionalResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestNullableOptionalResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestNullableOptionalResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterBooleanResponseCallback : public Callback::Callback -{ -public: - CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterBooleanResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterSimpleStructResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterSimpleStructResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterSimpleStructResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestEmitTestEventResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestEmitTestEventResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestEmitTestEventResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(); - - static void - CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestBatchHelperResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestBatchHelperResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestBatchHelperResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestBatchHelperResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback - : public Callback::Callback -{ -public: - CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback(jobject javaCallback); - - ~CHIPUnitTestingClusterTestDifferentVendorMeiResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestDifferentVendorMeiResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPSampleMeiClusterAddArgumentsResponseCallback - : public Callback::Callback -{ -public: - CHIPSampleMeiClusterAddArgumentsResponseCallback(jobject javaCallback); - - ~CHIPSampleMeiClusterAddArgumentsResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::SampleMei::Commands::AddArgumentsResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -} // namespace chip diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp deleted file mode 100644 index 9eec4398d4027f..00000000000000 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ /dev/null @@ -1,63402 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#include - -#include - -#include -#include -#include -#include -#include -#include - -CHIPIdentifyGeneratedCommandListAttributeCallback::CHIPIdentifyGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIdentifyGeneratedCommandListAttributeCallback::~CHIPIdentifyGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIdentifyGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIdentifyAcceptedCommandListAttributeCallback::CHIPIdentifyAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIdentifyAcceptedCommandListAttributeCallback::~CHIPIdentifyAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIdentifyAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIdentifyEventListAttributeCallback::CHIPIdentifyEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIdentifyEventListAttributeCallback::~CHIPIdentifyEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIdentifyEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIdentifyAttributeListAttributeCallback::CHIPIdentifyAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIdentifyAttributeListAttributeCallback::~CHIPIdentifyAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIdentifyAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupsGeneratedCommandListAttributeCallback::CHIPGroupsGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsGeneratedCommandListAttributeCallback::~CHIPGroupsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupsGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupsAcceptedCommandListAttributeCallback::CHIPGroupsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsAcceptedCommandListAttributeCallback::~CHIPGroupsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupsAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupsEventListAttributeCallback::CHIPGroupsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsEventListAttributeCallback::~CHIPGroupsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupsAttributeListAttributeCallback::CHIPGroupsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupsAttributeListAttributeCallback::~CHIPGroupsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupsAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOnOffGeneratedCommandListAttributeCallback::CHIPOnOffGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffEventListAttributeCallback::CHIPOnOffEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffSwitchConfigurationEventListAttributeCallback::CHIPOnOffSwitchConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLevelControlCurrentLevelAttributeCallback::CHIPLevelControlCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlCurrentLevelAttributeCallback::~CHIPLevelControlCurrentLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCurrentLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLevelControlGeneratedCommandListAttributeCallback::CHIPLevelControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlGeneratedCommandListAttributeCallback::~CHIPLevelControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLevelControlAcceptedCommandListAttributeCallback::CHIPLevelControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlAcceptedCommandListAttributeCallback::~CHIPLevelControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLevelControlEventListAttributeCallback::CHIPLevelControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlEventListAttributeCallback::~CHIPLevelControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLevelControlAttributeListAttributeCallback::~CHIPLevelControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CHIPBinaryInputBasicGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::~CHIPBinaryInputBasicGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CHIPBinaryInputBasicAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::~CHIPBinaryInputBasicAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBinaryInputBasicEventListAttributeCallback::CHIPBinaryInputBasicEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBinaryInputBasicEventListAttributeCallback::~CHIPBinaryInputBasicEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBinaryInputBasicAttributeListAttributeCallback::CHIPBinaryInputBasicAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBinaryInputBasicAttributeListAttributeCallback::~CHIPBinaryInputBasicAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CHIPPulseWidthModulationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::~CHIPPulseWidthModulationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CHIPPulseWidthModulationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::~CHIPPulseWidthModulationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPulseWidthModulationEventListAttributeCallback::CHIPPulseWidthModulationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPulseWidthModulationEventListAttributeCallback::~CHIPPulseWidthModulationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPulseWidthModulationAttributeListAttributeCallback::CHIPPulseWidthModulationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPulseWidthModulationAttributeListAttributeCallback::~CHIPPulseWidthModulationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPulseWidthModulationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorDeviceTypeListAttributeCallback::CHIPDescriptorDeviceTypeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorDeviceTypeListAttributeCallback::~CHIPDescriptorDeviceTypeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_deviceType; - std::string newElement_0_deviceTypeClassName = "java/lang/Long"; - std::string newElement_0_deviceTypeCtorSignature = "(J)V"; - jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), - newElement_0_deviceTypeCtorSignature.c_str(), - jninewElement_0_deviceType, newElement_0_deviceType); - jobject newElement_0_revision; - std::string newElement_0_revisionClassName = "java/lang/Integer"; - std::string newElement_0_revisionCtorSignature = "(I)V"; - jint jninewElement_0_revision = static_cast(entry_0.revision); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), - newElement_0_revisionCtorSignature.c_str(), - jninewElement_0_revision, newElement_0_revision); - - jclass deviceTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); - return; - } - - jmethodID deviceTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, deviceTypeStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V", &deviceTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); - return; - } - - newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, - newElement_0_revision); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorTagListAttributeCallback::CHIPDescriptorTagListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorTagListAttributeCallback::~CHIPDescriptorTagListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorTagListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_mfgCode; - if (entry_0.mfgCode.IsNull()) - { - newElement_0_mfgCode = nullptr; - } - else - { - std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_0_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), - newElement_0_mfgCodeCtorSignature.c_str(), - jninewElement_0_mfgCode, newElement_0_mfgCode); - } - jobject newElement_0_namespaceID; - std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; - std::string newElement_0_namespaceIDCtorSignature = "(I)V"; - jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), - newElement_0_namespaceIDCtorSignature.c_str(), - jninewElement_0_namespaceID, newElement_0_namespaceID); - jobject newElement_0_tag; - std::string newElement_0_tagClassName = "java/lang/Integer"; - std::string newElement_0_tagCtorSignature = "(I)V"; - jint jninewElement_0_tag = static_cast(entry_0.tag); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), jninewElement_0_tag, newElement_0_tag); - jobject newElement_0_label; - if (!entry_0.label.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); - } - else - { - jobject newElement_0_labelInsideOptional; - if (entry_0.label.Value().IsNull()) - { - newElement_0_labelInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value().Value(), - newElement_0_labelInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); - } - - jclass semanticTagStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); - return; - } - - jmethodID semanticTagStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, semanticTagStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", &semanticTagStructStructCtor_1); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); - return; - } - - newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, - newElement_0_namespaceID, newElement_0_tag, newElement_0_label); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorGeneratedCommandListAttributeCallback::CHIPDescriptorGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorGeneratedCommandListAttributeCallback::~CHIPDescriptorGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorAcceptedCommandListAttributeCallback::CHIPDescriptorAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorAcceptedCommandListAttributeCallback::~CHIPDescriptorAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorEventListAttributeCallback::CHIPDescriptorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorEventListAttributeCallback::~CHIPDescriptorEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDescriptorAttributeListAttributeCallback::CHIPDescriptorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDescriptorAttributeListAttributeCallback::~CHIPDescriptorAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBindingBindingAttributeCallback::CHIPBindingBindingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingBindingAttributeCallback::~CHIPBindingBindingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingBindingAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_node; - if (!entry_0.node.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_node); - } - else - { - jobject newElement_0_nodeInsideOptional; - std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), - jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); - } - jobject newElement_0_group; - if (!entry_0.group.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_group); - } - else - { - jobject newElement_0_groupInsideOptional; - std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), - jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); - } - jobject newElement_0_endpoint; - if (!entry_0.endpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endpoint); - } - else - { - jobject newElement_0_endpointInsideOptional; - std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_endpointInsideOptionalClassName.c_str(), newElement_0_endpointInsideOptionalCtorSignature.c_str(), - jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); - } - jobject newElement_0_cluster; - if (!entry_0.cluster.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_cluster); - } - else - { - jobject newElement_0_clusterInsideOptional; - std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_clusterInsideOptionalClassName.c_str(), newElement_0_clusterInsideOptionalCtorSignature.c_str(), - jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass targetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", - targetStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); - return; - } - - jmethodID targetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, targetStructStructClass_1, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", - &targetStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); - return; - } - - newElement_0 = env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, - newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBindingGeneratedCommandListAttributeCallback::CHIPBindingGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingGeneratedCommandListAttributeCallback::~CHIPBindingGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBindingAcceptedCommandListAttributeCallback::CHIPBindingAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingAcceptedCommandListAttributeCallback::~CHIPBindingAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBindingEventListAttributeCallback::CHIPBindingEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingEventListAttributeCallback::~CHIPBindingEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBindingAttributeListAttributeCallback::CHIPBindingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingAttributeListAttributeCallback::~CHIPBindingAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlAclAttributeCallback::CHIPAccessControlAclAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlAclAttributeCallback::~CHIPAccessControlAclAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlAclAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_privilege; - std::string newElement_0_privilegeClassName = "java/lang/Integer"; - std::string newElement_0_privilegeCtorSignature = "(I)V"; - jint jninewElement_0_privilege = static_cast(entry_0.privilege); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), - newElement_0_privilegeCtorSignature.c_str(), - jninewElement_0_privilege, newElement_0_privilege); - jobject newElement_0_authMode; - std::string newElement_0_authModeClassName = "java/lang/Integer"; - std::string newElement_0_authModeCtorSignature = "(I)V"; - jint jninewElement_0_authMode = static_cast(entry_0.authMode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), - newElement_0_authModeCtorSignature.c_str(), - jninewElement_0_authMode, newElement_0_authMode); - jobject newElement_0_subjects; - if (entry_0.subjects.IsNull()) - { - newElement_0_subjects = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_subjects); - - auto iter_newElement_0_subjects_3 = entry_0.subjects.Value().begin(); - while (iter_newElement_0_subjects_3.Next()) - { - auto & entry_3 = iter_newElement_0_subjects_3.GetValue(); - jobject newElement_3; - std::string newElement_3ClassName = "java/lang/Long"; - std::string newElement_3CtorSignature = "(J)V"; - jlong jninewElement_3 = static_cast(entry_3); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); - chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); - } - } - jobject newElement_0_targets; - if (entry_0.targets.IsNull()) - { - newElement_0_targets = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); - - auto iter_newElement_0_targets_3 = entry_0.targets.Value().begin(); - while (iter_newElement_0_targets_3.Next()) - { - auto & entry_3 = iter_newElement_0_targets_3.GetValue(); - jobject newElement_3; - jobject newElement_3_cluster; - if (entry_3.cluster.IsNull()) - { - newElement_3_cluster = nullptr; - } - else - { - std::string newElement_3_clusterClassName = "java/lang/Long"; - std::string newElement_3_clusterCtorSignature = "(J)V"; - jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_clusterClassName.c_str(), - newElement_3_clusterCtorSignature.c_str(), - jninewElement_3_cluster, newElement_3_cluster); - } - jobject newElement_3_endpoint; - if (entry_3.endpoint.IsNull()) - { - newElement_3_endpoint = nullptr; - } - else - { - std::string newElement_3_endpointClassName = "java/lang/Integer"; - std::string newElement_3_endpointCtorSignature = "(I)V"; - jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_endpointClassName.c_str(), - newElement_3_endpointCtorSignature.c_str(), - jninewElement_3_endpoint, newElement_3_endpoint); - } - jobject newElement_3_deviceType; - if (entry_3.deviceType.IsNull()) - { - newElement_3_deviceType = nullptr; - } - else - { - std::string newElement_3_deviceTypeClassName = "java/lang/Long"; - std::string newElement_3_deviceTypeCtorSignature = "(J)V"; - jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), - jninewElement_3_deviceType, newElement_3_deviceType); - } - - jclass accessControlTargetStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", - accessControlTargetStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); - return; - } - - jmethodID accessControlTargetStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlTargetStructStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", - &accessControlTargetStructStructCtor_4); - if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); - return; - } - - newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, - newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); - chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); - } - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass accessControlEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", - accessControlEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); - return; - } - - jmethodID accessControlEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlEntryStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &accessControlEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, newElement_0_privilege, - newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlExtensionAttributeCallback::CHIPAccessControlExtensionAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlExtensionAttributeCallback::~CHIPAccessControlExtensionAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlExtensionAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_data; - jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast(entry_0.data.size())); - env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast(entry_0.data.size()), - reinterpret_cast(entry_0.data.data())); - newElement_0_data = newElement_0_dataByteArray; - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass accessControlExtensionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", - accessControlExtensionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); - return; - } - - jmethodID accessControlExtensionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", - "([BLjava/lang/Integer;)V", &accessControlExtensionStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, - newElement_0_data, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlGeneratedCommandListAttributeCallback::CHIPAccessControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlGeneratedCommandListAttributeCallback::~CHIPAccessControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlAcceptedCommandListAttributeCallback::CHIPAccessControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlAcceptedCommandListAttributeCallback::~CHIPAccessControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlEventListAttributeCallback::CHIPAccessControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlEventListAttributeCallback::~CHIPAccessControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccessControlAttributeListAttributeCallback::CHIPAccessControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccessControlAttributeListAttributeCallback::~CHIPAccessControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsActionListAttributeCallback::CHIPActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsActionListAttributeCallback::~CHIPActionsActionListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsActionListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_actionID; - std::string newElement_0_actionIDClassName = "java/lang/Integer"; - std::string newElement_0_actionIDCtorSignature = "(I)V"; - jint jninewElement_0_actionID = static_cast(entry_0.actionID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), - newElement_0_actionIDCtorSignature.c_str(), - jninewElement_0_actionID, newElement_0_actionID); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - jobject newElement_0_endpointListID; - std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; - std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - jninewElement_0_endpointListID, newElement_0_endpointListID); - jobject newElement_0_supportedCommands; - std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; - std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; - jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), - jninewElement_0_supportedCommands, newElement_0_supportedCommands); - jobject newElement_0_state; - std::string newElement_0_stateClassName = "java/lang/Integer"; - std::string newElement_0_stateCtorSignature = "(I)V"; - jint jninewElement_0_state = static_cast(entry_0.state); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), - newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, - newElement_0_state); - - jclass actionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", - actionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); - return; - } - - jmethodID actionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, actionStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &actionStructStructCtor_1); - if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, newElement_0_name, - newElement_0_type, newElement_0_endpointListID, newElement_0_supportedCommands, newElement_0_state); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsEndpointListsAttributeCallback::CHIPActionsEndpointListsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsEndpointListsAttributeCallback::~CHIPActionsEndpointListsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsEndpointListsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_endpointListID; - std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; - std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - jninewElement_0_endpointListID, newElement_0_endpointListID); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - jobject newElement_0_endpoints; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); - - auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); - while (iter_newElement_0_endpoints_2.Next()) - { - auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); - } - - jclass endpointListStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); - return; - } - - jmethodID endpointListStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, endpointListStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &endpointListStructStructCtor_1); - if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); - return; - } - - newElement_0 = env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, - newElement_0_name, newElement_0_type, newElement_0_endpoints); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsGeneratedCommandListAttributeCallback::CHIPActionsGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsGeneratedCommandListAttributeCallback::~CHIPActionsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsAcceptedCommandListAttributeCallback::CHIPActionsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsAcceptedCommandListAttributeCallback::~CHIPActionsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsEventListAttributeCallback::CHIPActionsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsEventListAttributeCallback::~CHIPActionsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActionsAttributeListAttributeCallback::CHIPActionsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActionsAttributeListAttributeCallback::~CHIPActionsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBasicInformationGeneratedCommandListAttributeCallback::CHIPBasicInformationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBasicInformationGeneratedCommandListAttributeCallback::~CHIPBasicInformationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBasicInformationAcceptedCommandListAttributeCallback::CHIPBasicInformationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBasicInformationAcceptedCommandListAttributeCallback::~CHIPBasicInformationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBasicInformationEventListAttributeCallback::CHIPBasicInformationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBasicInformationEventListAttributeCallback::~CHIPBasicInformationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBasicInformationAttributeListAttributeCallback::CHIPBasicInformationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBasicInformationAttributeListAttributeCallback::~CHIPBasicInformationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CHIPOtaSoftwareUpdateProviderEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::~CHIPOtaSoftwareUpdateProviderEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_providerNodeID; - std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; - std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), - newElement_0_providerNodeIDCtorSignature.c_str(), - jninewElement_0_providerNodeID, newElement_0_providerNodeID); - jobject newElement_0_endpoint; - std::string newElement_0_endpointClassName = "java/lang/Integer"; - std::string newElement_0_endpointCtorSignature = "(I)V"; - jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), - newElement_0_endpointCtorSignature.c_str(), - jninewElement_0_endpoint, newElement_0_endpoint); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass providerLocationStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", - providerLocationStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); - return; - } - - jmethodID providerLocationStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &providerLocationStructCtor_1); - if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); - return; - } - - newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, newElement_0_providerNodeID, - newElement_0_endpoint, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalizationConfigurationSupportedLocalesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: - CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: - CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLocalizationConfigurationEventListAttributeCallback::CHIPLocalizationConfigurationEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLocalizationConfigurationEventListAttributeCallback::~CHIPLocalizationConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLocalizationConfigurationAttributeListAttributeCallback::CHIPLocalizationConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLocalizationConfigurationAttributeListAttributeCallback::~CHIPLocalizationConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: - CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: - ~CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::~CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::~CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeFormatLocalizationEventListAttributeCallback::CHIPTimeFormatLocalizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeFormatLocalizationEventListAttributeCallback::~CHIPTimeFormatLocalizationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeFormatLocalizationAttributeListAttributeCallback::CHIPTimeFormatLocalizationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeFormatLocalizationAttributeListAttributeCallback::~CHIPTimeFormatLocalizationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CHIPUnitLocalizationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitLocalizationGeneratedCommandListAttributeCallback::~CHIPUnitLocalizationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CHIPUnitLocalizationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitLocalizationAcceptedCommandListAttributeCallback::~CHIPUnitLocalizationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitLocalizationEventListAttributeCallback::CHIPUnitLocalizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitLocalizationEventListAttributeCallback::~CHIPUnitLocalizationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitLocalizationAttributeListAttributeCallback::CHIPUnitLocalizationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitLocalizationAttributeListAttributeCallback::~CHIPUnitLocalizationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: - CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationEventListAttributeCallback::CHIPPowerSourceConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationEventListAttributeCallback::~CHIPPowerSourceConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationAttributeListAttributeCallback::CHIPPowerSourceConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationAttributeListAttributeCallback::~CHIPPowerSourceConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::~CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::~CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CHIPPowerSourceWiredAssessedCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceWiredAssessedCurrentAttributeCallback::~CHIPPowerSourceWiredAssessedCurrentAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceActiveWiredFaultsAttributeCallback::CHIPPowerSourceActiveWiredFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceActiveWiredFaultsAttributeCallback::~CHIPPowerSourceActiveWiredFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceBatVoltageAttributeCallback::CHIPPowerSourceBatVoltageAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceBatVoltageAttributeCallback::~CHIPPowerSourceBatVoltageAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceBatPercentRemainingAttributeCallback::CHIPPowerSourceBatPercentRemainingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceBatPercentRemainingAttributeCallback::~CHIPPowerSourceBatPercentRemainingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceBatTimeRemainingAttributeCallback::CHIPPowerSourceBatTimeRemainingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceBatTimeRemainingAttributeCallback::~CHIPPowerSourceBatTimeRemainingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceActiveBatFaultsAttributeCallback::CHIPPowerSourceActiveBatFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceActiveBatFaultsAttributeCallback::~CHIPPowerSourceActiveBatFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CHIPPowerSourceBatTimeToFullChargeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceBatTimeToFullChargeAttributeCallback::~CHIPPowerSourceBatTimeToFullChargeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceBatChargingCurrentAttributeCallback::CHIPPowerSourceBatChargingCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceBatChargingCurrentAttributeCallback::~CHIPPowerSourceBatChargingCurrentAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CHIPPowerSourceActiveBatChargeFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::~CHIPPowerSourceActiveBatChargeFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceEndpointListAttributeCallback::CHIPPowerSourceEndpointListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceEndpointListAttributeCallback::~CHIPPowerSourceEndpointListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceGeneratedCommandListAttributeCallback::CHIPPowerSourceGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceGeneratedCommandListAttributeCallback::~CHIPPowerSourceGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceAcceptedCommandListAttributeCallback::CHIPPowerSourceAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceAcceptedCommandListAttributeCallback::~CHIPPowerSourceAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceEventListAttributeCallback::CHIPPowerSourceEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceEventListAttributeCallback::~CHIPPowerSourceEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceAttributeListAttributeCallback::CHIPPowerSourceAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceAttributeListAttributeCallback::~CHIPPowerSourceAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CHIPGeneralCommissioningGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::~CHIPGeneralCommissioningGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CHIPGeneralCommissioningAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::~CHIPGeneralCommissioningAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralCommissioningEventListAttributeCallback::CHIPGeneralCommissioningEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningEventListAttributeCallback::~CHIPGeneralCommissioningEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralCommissioningAttributeListAttributeCallback::CHIPGeneralCommissioningAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralCommissioningAttributeListAttributeCallback::~CHIPGeneralCommissioningAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningNetworksAttributeCallback::CHIPNetworkCommissioningNetworksAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningNetworksAttributeCallback::~CHIPNetworkCommissioningNetworksAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_networkID; - jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast(entry_0.networkID.size())); - env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast(entry_0.networkID.size()), - reinterpret_cast(entry_0.networkID.data())); - newElement_0_networkID = newElement_0_networkIDByteArray; - jobject newElement_0_connected; - std::string newElement_0_connectedClassName = "java/lang/Boolean"; - std::string newElement_0_connectedCtorSignature = "(Z)V"; - jboolean jninewElement_0_connected = static_cast(entry_0.connected); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), - newElement_0_connectedCtorSignature.c_str(), - jninewElement_0_connected, newElement_0_connected); - jobject newElement_0_networkIdentifier; - if (!entry_0.networkIdentifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); - } - else - { - jobject newElement_0_networkIdentifierInsideOptional; - if (entry_0.networkIdentifier.Value().IsNull()) - { - newElement_0_networkIdentifierInsideOptional = nullptr; - } - else - { - jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); - env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, - static_cast(entry_0.networkIdentifier.Value().Value().size()), - reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); - newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, - newElement_0_networkIdentifier); - } - jobject newElement_0_clientIdentifier; - if (!entry_0.clientIdentifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); - } - else - { - jobject newElement_0_clientIdentifierInsideOptional; - if (entry_0.clientIdentifier.Value().IsNull()) - { - newElement_0_clientIdentifierInsideOptional = nullptr; - } - else - { - jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); - env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, - static_cast(entry_0.clientIdentifier.Value().Value().size()), - reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); - newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, - newElement_0_clientIdentifier); - } - - jclass networkInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", networkInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); - return; - } - - jmethodID networkInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, networkInfoStructStructClass_1, "", - "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", - &networkInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, - newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::~CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CHIPNetworkCommissioningLastNetworkIDAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningLastNetworkIDAttributeCallback::~CHIPNetworkCommissioningLastNetworkIDAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::~CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::~CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CHIPNetworkCommissioningGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::~CHIPNetworkCommissioningGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CHIPNetworkCommissioningAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::~CHIPNetworkCommissioningAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningEventListAttributeCallback::CHIPNetworkCommissioningEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningEventListAttributeCallback::~CHIPNetworkCommissioningEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNetworkCommissioningAttributeListAttributeCallback::CHIPNetworkCommissioningAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNetworkCommissioningAttributeListAttributeCallback::~CHIPNetworkCommissioningAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CHIPDiagnosticLogsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::~CHIPDiagnosticLogsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CHIPDiagnosticLogsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::~CHIPDiagnosticLogsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDiagnosticLogsEventListAttributeCallback::CHIPDiagnosticLogsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDiagnosticLogsEventListAttributeCallback::~CHIPDiagnosticLogsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDiagnosticLogsAttributeListAttributeCallback::CHIPDiagnosticLogsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDiagnosticLogsAttributeListAttributeCallback::~CHIPDiagnosticLogsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_isOperational; - std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; - std::string newElement_0_isOperationalCtorSignature = "(Z)V"; - jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), - newElement_0_isOperationalCtorSignature.c_str(), - jninewElement_0_isOperational, newElement_0_isOperational); - jobject newElement_0_offPremiseServicesReachableIPv4; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) - { - newElement_0_offPremiseServicesReachableIPv4 = nullptr; - } - else - { - std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; - std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; - jboolean jninewElement_0_offPremiseServicesReachableIPv4 = - static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv4, - newElement_0_offPremiseServicesReachableIPv4); - } - jobject newElement_0_offPremiseServicesReachableIPv6; - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) - { - newElement_0_offPremiseServicesReachableIPv6 = nullptr; - } - else - { - std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; - std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; - jboolean jninewElement_0_offPremiseServicesReachableIPv6 = - static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv6, - newElement_0_offPremiseServicesReachableIPv6); - } - jobject newElement_0_hardwareAddress; - jbyteArray newElement_0_hardwareAddressByteArray = env->NewByteArray(static_cast(entry_0.hardwareAddress.size())); - env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, static_cast(entry_0.hardwareAddress.size()), - reinterpret_cast(entry_0.hardwareAddress.data())); - newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; - jobject newElement_0_IPv4Addresses; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv4Addresses); - - auto iter_newElement_0_IPv4Addresses_2 = entry_0.IPv4Addresses.begin(); - while (iter_newElement_0_IPv4Addresses_2.Next()) - { - auto & entry_2 = iter_newElement_0_IPv4Addresses_2.GetValue(); - jobject newElement_2; - jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); - env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), - reinterpret_cast(entry_2.data())); - newElement_2 = newElement_2ByteArray; - chip::JniReferences::GetInstance().AddToList(newElement_0_IPv4Addresses, newElement_2); - } - jobject newElement_0_IPv6Addresses; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv6Addresses); - - auto iter_newElement_0_IPv6Addresses_2 = entry_0.IPv6Addresses.begin(); - while (iter_newElement_0_IPv6Addresses_2.Next()) - { - auto & entry_2 = iter_newElement_0_IPv6Addresses_2.GetValue(); - jobject newElement_2; - jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); - env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), - reinterpret_cast(entry_2.data())); - newElement_2 = newElement_2ByteArray; - chip::JniReferences::GetInstance().AddToList(newElement_0_IPv6Addresses, newElement_2); - } - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - - jclass networkInterfaceStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", networkInterfaceStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); - return; - } - - jmethodID networkInterfaceStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, networkInterfaceStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/util/" - "ArrayList;Ljava/lang/Integer;)V", - &networkInterfaceStructCtor_1); - if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); - return; - } - - newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, - newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, - newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, - newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::~CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::~CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsEventListAttributeCallback::CHIPGeneralDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsEventListAttributeCallback::~CHIPGeneralDiagnosticsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsAttributeListAttributeCallback::CHIPGeneralDiagnosticsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsAttributeListAttributeCallback::~CHIPGeneralDiagnosticsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_id; - std::string newElement_0_idClassName = "java/lang/Long"; - std::string newElement_0_idCtorSignature = "(J)V"; - jlong jninewElement_0_id = static_cast(entry_0.id); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_stackFreeCurrent; - if (!entry_0.stackFreeCurrent.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeCurrent); - } - else - { - jobject newElement_0_stackFreeCurrentInsideOptional; - std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), - newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeCurrentInsideOptional, - newElement_0_stackFreeCurrentInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, - newElement_0_stackFreeCurrent); - } - jobject newElement_0_stackFreeMinimum; - if (!entry_0.stackFreeMinimum.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeMinimum); - } - else - { - jobject newElement_0_stackFreeMinimumInsideOptional; - std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), - newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeMinimumInsideOptional, - newElement_0_stackFreeMinimumInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, - newElement_0_stackFreeMinimum); - } - jobject newElement_0_stackSize; - if (!entry_0.stackSize.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackSize); - } - else - { - jobject newElement_0_stackSizeInsideOptional; - std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackSizeInsideOptionalClassName.c_str(), newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), - jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); - } - - jclass threadMetricsStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", - threadMetricsStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); - return; - } - - jmethodID threadMetricsStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, threadMetricsStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &threadMetricsStructStructCtor_1); - if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, newElement_0_name, - newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, newElement_0_stackSize); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSoftwareDiagnosticsEventListAttributeCallback::CHIPSoftwareDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSoftwareDiagnosticsEventListAttributeCallback::~CHIPSoftwareDiagnosticsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CHIPSoftwareDiagnosticsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSoftwareDiagnosticsAttributeListAttributeCallback::~CHIPSoftwareDiagnosticsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CHIPThreadNetworkDiagnosticsChannelAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsChannelAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::~CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::~CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsPanIdAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPanIdAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::~CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::~CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_extAddress; - std::string newElement_0_extAddressClassName = "java/lang/Long"; - std::string newElement_0_extAddressCtorSignature = "(J)V"; - jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - jninewElement_0_extAddress, newElement_0_extAddress); - jobject newElement_0_age; - std::string newElement_0_ageClassName = "java/lang/Long"; - std::string newElement_0_ageCtorSignature = "(J)V"; - jlong jninewElement_0_age = static_cast(entry_0.age); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); - jobject newElement_0_rloc16; - std::string newElement_0_rloc16ClassName = "java/lang/Integer"; - std::string newElement_0_rloc16CtorSignature = "(I)V"; - jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, - newElement_0_rloc16); - jobject newElement_0_linkFrameCounter; - std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; - std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; - jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), - jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); - jobject newElement_0_mleFrameCounter; - std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; - std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; - jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), - newElement_0_mleFrameCounterCtorSignature.c_str(), - jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); - jobject newElement_0_lqi; - std::string newElement_0_lqiClassName = "java/lang/Integer"; - std::string newElement_0_lqiCtorSignature = "(I)V"; - jint jninewElement_0_lqi = static_cast(entry_0.lqi); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), jninewElement_0_lqi, newElement_0_lqi); - jobject newElement_0_averageRssi; - if (entry_0.averageRssi.IsNull()) - { - newElement_0_averageRssi = nullptr; - } - else - { - std::string newElement_0_averageRssiClassName = "java/lang/Integer"; - std::string newElement_0_averageRssiCtorSignature = "(I)V"; - jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), - newElement_0_averageRssiCtorSignature.c_str(), - jninewElement_0_averageRssi, newElement_0_averageRssi); - } - jobject newElement_0_lastRssi; - if (entry_0.lastRssi.IsNull()) - { - newElement_0_lastRssi = nullptr; - } - else - { - std::string newElement_0_lastRssiClassName = "java/lang/Integer"; - std::string newElement_0_lastRssiCtorSignature = "(I)V"; - jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), - newElement_0_lastRssiCtorSignature.c_str(), - jninewElement_0_lastRssi, newElement_0_lastRssi); - } - jobject newElement_0_frameErrorRate; - std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; - std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; - jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), - newElement_0_frameErrorRateCtorSignature.c_str(), - jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); - jobject newElement_0_messageErrorRate; - std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; - std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; - jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), - newElement_0_messageErrorRateCtorSignature.c_str(), - jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); - jobject newElement_0_rxOnWhenIdle; - std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; - std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; - jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), - newElement_0_rxOnWhenIdleCtorSignature.c_str(), - jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); - jobject newElement_0_fullThreadDevice; - std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; - std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; - jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), - jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); - jobject newElement_0_fullNetworkData; - std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; - std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; - jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), - jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); - jobject newElement_0_isChild; - std::string newElement_0_isChildClassName = "java/lang/Boolean"; - std::string newElement_0_isChildCtorSignature = "(Z)V"; - jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), - newElement_0_isChildCtorSignature.c_str(), - jninewElement_0_isChild, newElement_0_isChild); - - jclass neighborTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", - neighborTableStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); - return; - } - - jmethodID neighborTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, neighborTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;)V", - &neighborTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); - return; - } - - newElement_0 = env->NewObject( - neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, - newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, - newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, - newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::~CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_extAddress; - std::string newElement_0_extAddressClassName = "java/lang/Long"; - std::string newElement_0_extAddressCtorSignature = "(J)V"; - jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - jninewElement_0_extAddress, newElement_0_extAddress); - jobject newElement_0_rloc16; - std::string newElement_0_rloc16ClassName = "java/lang/Integer"; - std::string newElement_0_rloc16CtorSignature = "(I)V"; - jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, - newElement_0_rloc16); - jobject newElement_0_routerId; - std::string newElement_0_routerIdClassName = "java/lang/Integer"; - std::string newElement_0_routerIdCtorSignature = "(I)V"; - jint jninewElement_0_routerId = static_cast(entry_0.routerId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), - newElement_0_routerIdCtorSignature.c_str(), - jninewElement_0_routerId, newElement_0_routerId); - jobject newElement_0_nextHop; - std::string newElement_0_nextHopClassName = "java/lang/Integer"; - std::string newElement_0_nextHopCtorSignature = "(I)V"; - jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), - newElement_0_nextHopCtorSignature.c_str(), - jninewElement_0_nextHop, newElement_0_nextHop); - jobject newElement_0_pathCost; - std::string newElement_0_pathCostClassName = "java/lang/Integer"; - std::string newElement_0_pathCostCtorSignature = "(I)V"; - jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), - newElement_0_pathCostCtorSignature.c_str(), - jninewElement_0_pathCost, newElement_0_pathCost); - jobject newElement_0_LQIIn; - std::string newElement_0_LQIInClassName = "java/lang/Integer"; - std::string newElement_0_LQIInCtorSignature = "(I)V"; - jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), - newElement_0_LQIInCtorSignature.c_str(), jninewElement_0_LQIIn, - newElement_0_LQIIn); - jobject newElement_0_LQIOut; - std::string newElement_0_LQIOutClassName = "java/lang/Integer"; - std::string newElement_0_LQIOutCtorSignature = "(I)V"; - jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), - newElement_0_LQIOutCtorSignature.c_str(), jninewElement_0_LQIOut, - newElement_0_LQIOut); - jobject newElement_0_age; - std::string newElement_0_ageClassName = "java/lang/Integer"; - std::string newElement_0_ageCtorSignature = "(I)V"; - jint jninewElement_0_age = static_cast(entry_0.age); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); - jobject newElement_0_allocated; - std::string newElement_0_allocatedClassName = "java/lang/Boolean"; - std::string newElement_0_allocatedCtorSignature = "(Z)V"; - jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), - newElement_0_allocatedCtorSignature.c_str(), - jninewElement_0_allocated, newElement_0_allocated); - jobject newElement_0_linkEstablished; - std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; - std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; - jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), - jninewElement_0_linkEstablished, newElement_0_linkEstablished); - - jclass routeTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", - routeTableStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); - return; - } - - jmethodID routeTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, routeTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" - "lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", - &routeTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); - return; - } - - newElement_0 = env->NewObject(routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, - newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, newElement_0_pathCost, - newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, newElement_0_allocated, - newElement_0_linkEstablished); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CHIPThreadNetworkDiagnosticsWeightingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::~CHIPThreadNetworkDiagnosticsWeightingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::~CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CHIPThreadNetworkDiagnosticsDelayAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsDelayAttributeCallback::~CHIPThreadNetworkDiagnosticsDelayAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CHIPThreadNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsEventListAttributeCallback::~CHIPThreadNetworkDiagnosticsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::~CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CHIPWiFiNetworkDiagnosticsBssidAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::~CHIPWiFiNetworkDiagnosticsBssidAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::~CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::~CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::~CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CHIPWiFiNetworkDiagnosticsRssiAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::~CHIPWiFiNetworkDiagnosticsRssiAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: - CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: - ~CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: - CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: - ~CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::~CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CHIPWiFiNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::~CHIPWiFiNetworkDiagnosticsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::~CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::~CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - jboolean jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::~CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - jboolean jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - ~CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - ~CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CHIPEthernetNetworkDiagnosticsEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::~CHIPEthernetNetworkDiagnosticsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::~CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationUTCTimeAttributeCallback::CHIPTimeSynchronizationUTCTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationUTCTimeAttributeCallback::~CHIPTimeSynchronizationUTCTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTimeSynchronizationDefaultNTPAttributeCallback::CHIPTimeSynchronizationDefaultNTPAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationDefaultNTPAttributeCallback::~CHIPTimeSynchronizationDefaultNTPAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTimeSynchronizationTimeZoneAttributeCallback::CHIPTimeSynchronizationTimeZoneAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationTimeZoneAttributeCallback::~CHIPTimeSynchronizationTimeZoneAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_offset; - std::string newElement_0_offsetClassName = "java/lang/Long"; - std::string newElement_0_offsetCtorSignature = "(J)V"; - jlong jninewElement_0_offset = static_cast(entry_0.offset); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - jninewElement_0_offset, newElement_0_offset); - jobject newElement_0_validAt; - std::string newElement_0_validAtClassName = "java/lang/Long"; - std::string newElement_0_validAtCtorSignature = "(J)V"; - jlong jninewElement_0_validAt = static_cast(entry_0.validAt); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), - newElement_0_validAtCtorSignature.c_str(), - jninewElement_0_validAt, newElement_0_validAt); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - - jclass timeZoneStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); - return; - } - - jmethodID timeZoneStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", - &timeZoneStructStructCtor_1); - if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); - return; - } - - newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, - newElement_0_validAt, newElement_0_name); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationDSTOffsetAttributeCallback::CHIPTimeSynchronizationDSTOffsetAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationDSTOffsetAttributeCallback::~CHIPTimeSynchronizationDSTOffsetAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_offset; - std::string newElement_0_offsetClassName = "java/lang/Long"; - std::string newElement_0_offsetCtorSignature = "(J)V"; - jlong jninewElement_0_offset = static_cast(entry_0.offset); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - jninewElement_0_offset, newElement_0_offset); - jobject newElement_0_validStarting; - std::string newElement_0_validStartingClassName = "java/lang/Long"; - std::string newElement_0_validStartingCtorSignature = "(J)V"; - jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), - newElement_0_validStartingCtorSignature.c_str(), - jninewElement_0_validStarting, newElement_0_validStarting); - jobject newElement_0_validUntil; - if (entry_0.validUntil.IsNull()) - { - newElement_0_validUntil = nullptr; - } - else - { - std::string newElement_0_validUntilClassName = "java/lang/Long"; - std::string newElement_0_validUntilCtorSignature = "(J)V"; - jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), - newElement_0_validUntilCtorSignature.c_str(), - jninewElement_0_validUntil, newElement_0_validUntil); - } - - jclass DSTOffsetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", DSTOffsetStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); - return; - } - - jmethodID DSTOffsetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", - &DSTOffsetStructStructCtor_1); - if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); - return; - } - - newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, - newElement_0_validStarting, newElement_0_validUntil); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationLocalTimeAttributeCallback::CHIPTimeSynchronizationLocalTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationLocalTimeAttributeCallback::~CHIPTimeSynchronizationLocalTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CHIPTimeSynchronizationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::~CHIPTimeSynchronizationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CHIPTimeSynchronizationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::~CHIPTimeSynchronizationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationEventListAttributeCallback::CHIPTimeSynchronizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationEventListAttributeCallback::~CHIPTimeSynchronizationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimeSynchronizationAttributeListAttributeCallback::CHIPTimeSynchronizationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimeSynchronizationAttributeListAttributeCallback::~CHIPTimeSynchronizationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBasicInformationEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceBasicInformationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorCommissioningAdminVendorIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministratorCommissioningAdminVendorIdAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommissioningEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorCommissioningEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_noc; - jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); - env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), - reinterpret_cast(entry_0.noc.data())); - newElement_0_noc = newElement_0_nocByteArray; - jobject newElement_0_icac; - if (entry_0.icac.IsNull()) - { - newElement_0_icac = nullptr; - } - else - { - jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); - env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), - reinterpret_cast(entry_0.icac.Value().data())); - newElement_0_icac = newElement_0_icacByteArray; - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass NOCStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); - return; - } - - jmethodID NOCStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V", - &NOCStructStructCtor_1); - if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); - return; - } - - newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, - newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFabricsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsFabricsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_rootPublicKey; - jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); - env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), - reinterpret_cast(entry_0.rootPublicKey.data())); - newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; - jobject newElement_0_vendorID; - std::string newElement_0_vendorIDClassName = "java/lang/Integer"; - std::string newElement_0_vendorIDCtorSignature = "(I)V"; - jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), - newElement_0_vendorIDCtorSignature.c_str(), - jninewElement_0_vendorID, newElement_0_vendorID); - jobject newElement_0_fabricID; - std::string newElement_0_fabricIDClassName = "java/lang/Long"; - std::string newElement_0_fabricIDCtorSignature = "(J)V"; - jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), - newElement_0_fabricIDCtorSignature.c_str(), - jninewElement_0_fabricID, newElement_0_fabricID); - jobject newElement_0_nodeID; - std::string newElement_0_nodeIDClassName = "java/lang/Long"; - std::string newElement_0_nodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), - newElement_0_nodeIDCtorSignature.c_str(), - jninewElement_0_nodeID, newElement_0_nodeID); - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass fabricDescriptorStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", - fabricDescriptorStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); - return; - } - - jmethodID fabricDescriptorStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, fabricDescriptorStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", - &fabricDescriptorStructStructCtor_1); - if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); - return; - } - - newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, - newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, - newElement_0_label, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationalCredentialsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalCredentialsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperationalCredentialsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentialsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredentialsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupKeyMapAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroupKeyMapAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - jint jninewElement_0_groupId = static_cast(entry_0.groupId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - jninewElement_0_groupId, newElement_0_groupId); - jobject newElement_0_groupKeySetID; - std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; - std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; - jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), - newElement_0_groupKeySetIDCtorSignature.c_str(), - jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass groupKeyMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); - return; - } - - jmethodID groupKeyMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, groupKeyMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &groupKeyMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); - return; - } - - newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, - newElement_0_groupKeySetID, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTableAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupTableAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - jint jninewElement_0_groupId = static_cast(entry_0.groupId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - jninewElement_0_groupId, newElement_0_groupId); - jobject newElement_0_endpoints; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); - - auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); - while (iter_newElement_0_endpoints_2.Next()) - { - auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); - } - jobject newElement_0_groupName; - if (!entry_0.groupName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); - } - else - { - jobject newElement_0_groupNameInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), - newElement_0_groupNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass groupInfoMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); - return; - } - - jmethodID groupInfoMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, groupInfoMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", &groupInfoMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); - return; - } - - newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, - newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManagementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManagementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); - return; - } - - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUserLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); - return; - } - - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CHIPProxyConfigurationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyConfigurationGeneratedCommandListAttributeCallback::~CHIPProxyConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CHIPProxyConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyConfigurationAcceptedCommandListAttributeCallback::~CHIPProxyConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyConfigurationEventListAttributeCallback::CHIPProxyConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyConfigurationEventListAttributeCallback::~CHIPProxyConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyConfigurationAttributeListAttributeCallback::CHIPProxyConfigurationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyConfigurationAttributeListAttributeCallback::~CHIPProxyConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CHIPProxyDiscoveryGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::~CHIPProxyDiscoveryGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CHIPProxyDiscoveryAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::~CHIPProxyDiscoveryAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyDiscoveryEventListAttributeCallback::CHIPProxyDiscoveryEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyDiscoveryEventListAttributeCallback::~CHIPProxyDiscoveryEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyDiscoveryAttributeListAttributeCallback::CHIPProxyDiscoveryAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyDiscoveryAttributeListAttributeCallback::~CHIPProxyDiscoveryAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyValidGeneratedCommandListAttributeCallback::CHIPProxyValidGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyValidGeneratedCommandListAttributeCallback::~CHIPProxyValidGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyValidAcceptedCommandListAttributeCallback::CHIPProxyValidAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyValidAcceptedCommandListAttributeCallback::~CHIPProxyValidAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyValidEventListAttributeCallback::CHIPProxyValidEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyValidEventListAttributeCallback::~CHIPProxyValidEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPProxyValidAttributeListAttributeCallback::CHIPProxyValidAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPProxyValidAttributeListAttributeCallback::~CHIPProxyValidAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIcdManagementRegisteredClientsAttributeCallback::CHIPIcdManagementRegisteredClientsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementRegisteredClientsAttributeCallback::~CHIPIcdManagementRegisteredClientsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_checkInNodeID; - std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; - std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), - newElement_0_checkInNodeIDCtorSignature.c_str(), - jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); - jobject newElement_0_monitoredSubject; - std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; - std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; - jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), - jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass monitoringRegistrationStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", - monitoringRegistrationStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); - return; - } - - jmethodID monitoringRegistrationStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, monitoringRegistrationStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V", - &monitoringRegistrationStructStructCtor_1); - if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); - return; - } - - newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, - newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIcdManagementGeneratedCommandListAttributeCallback::CHIPIcdManagementGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementGeneratedCommandListAttributeCallback::~CHIPIcdManagementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIcdManagementAcceptedCommandListAttributeCallback::CHIPIcdManagementAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementAcceptedCommandListAttributeCallback::~CHIPIcdManagementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIcdManagementEventListAttributeCallback::CHIPIcdManagementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementEventListAttributeCallback::~CHIPIcdManagementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIcdManagementAttributeListAttributeCallback::CHIPIcdManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIcdManagementAttributeListAttributeCallback::~CHIPIcdManagementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimerGeneratedCommandListAttributeCallback::CHIPTimerGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimerGeneratedCommandListAttributeCallback::~CHIPTimerGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimerAcceptedCommandListAttributeCallback::CHIPTimerAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimerAcceptedCommandListAttributeCallback::~CHIPTimerAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimerEventListAttributeCallback::CHIPTimerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimerEventListAttributeCallback::~CHIPTimerEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTimerAttributeListAttributeCallback::CHIPTimerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTimerAttributeListAttributeCallback::~CHIPTimerAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CHIPOvenCavityOperationalStatePhaseListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStatePhaseListAttributeCallback::~CHIPOvenCavityOperationalStatePhaseListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::~CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: - CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: - ~CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); - return; - } - - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: - CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: - ~CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: - CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: - ~CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStateEventListAttributeCallback::CHIPOvenCavityOperationalStateEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateEventListAttributeCallback::~CHIPOvenCavityOperationalStateEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CHIPOvenCavityOperationalStateAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenCavityOperationalStateAttributeListAttributeCallback::~CHIPOvenCavityOperationalStateAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::~CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::~CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::~CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::~CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryDryerControlsEventListAttributeCallback::CHIPLaundryDryerControlsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsEventListAttributeCallback::~CHIPLaundryDryerControlsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryDryerControlsAttributeListAttributeCallback::CHIPLaundryDryerControlsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryDryerControlsAttributeListAttributeCallback::~CHIPLaundryDryerControlsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass semanticTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); - return; - } - - jmethodID semanticTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &semanticTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); - return; - } - - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError( - Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - ~CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::CHIPMicrowaveOvenControlSupportedWattsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::~CHIPMicrowaveOvenControlSupportedWattsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return; - } - - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); - return; - } - - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPScenesManagementLastConfiguredByAttributeCallback::CHIPScenesManagementLastConfiguredByAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementLastConfiguredByAttributeCallback::~CHIPScenesManagementLastConfiguredByAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementLastConfiguredByAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPScenesManagementFabricSceneInfoAttributeCallback::CHIPScenesManagementFabricSceneInfoAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementFabricSceneInfoAttributeCallback::~CHIPScenesManagementFabricSceneInfoAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementFabricSceneInfoAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_sceneCount; - std::string newElement_0_sceneCountClassName = "java/lang/Integer"; - std::string newElement_0_sceneCountCtorSignature = "(I)V"; - jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), - newElement_0_sceneCountCtorSignature.c_str(), - jninewElement_0_sceneCount, newElement_0_sceneCount); - jobject newElement_0_currentScene; - std::string newElement_0_currentSceneClassName = "java/lang/Integer"; - std::string newElement_0_currentSceneCtorSignature = "(I)V"; - jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), - newElement_0_currentSceneCtorSignature.c_str(), - jninewElement_0_currentScene, newElement_0_currentScene); - jobject newElement_0_currentGroup; - std::string newElement_0_currentGroupClassName = "java/lang/Integer"; - std::string newElement_0_currentGroupCtorSignature = "(I)V"; - jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), - newElement_0_currentGroupCtorSignature.c_str(), - jninewElement_0_currentGroup, newElement_0_currentGroup); - jobject newElement_0_sceneValid; - std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; - std::string newElement_0_sceneValidCtorSignature = "(Z)V"; - jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), - newElement_0_sceneValidCtorSignature.c_str(), - jninewElement_0_sceneValid, newElement_0_sceneValid); - jobject newElement_0_remainingCapacity; - std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; - std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; - jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), - jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass sceneInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); - return; - } - - jmethodID sceneInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, sceneInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &sceneInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, - newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, - newElement_0_remainingCapacity, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPScenesManagementGeneratedCommandListAttributeCallback::CHIPScenesManagementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementGeneratedCommandListAttributeCallback::~CHIPScenesManagementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPScenesManagementAcceptedCommandListAttributeCallback::CHIPScenesManagementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementAcceptedCommandListAttributeCallback::~CHIPScenesManagementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPScenesManagementEventListAttributeCallback::CHIPScenesManagementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementEventListAttributeCallback::~CHIPScenesManagementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPScenesManagementAttributeListAttributeCallback::CHIPScenesManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesManagementAttributeListAttributeCallback::~CHIPScenesManagementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPScenesManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); - return; - } - - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); - return; - } - - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback:: - CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback:: - CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateConfigurationEventListAttributeCallback::CHIPBooleanStateConfigurationEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateConfigurationEventListAttributeCallback::~CHIPBooleanStateConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBooleanStateConfigurationAttributeListAttributeCallback::CHIPBooleanStateConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBooleanStateConfigurationAttributeListAttributeCallback::~CHIPBooleanStateConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBooleanStateConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CHIPValveConfigurationAndControlOpenDurationAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlOpenDurationAttributeCallback::~CHIPValveConfigurationAndControlOpenDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback:: - CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback:: - ~CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::~CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlRemainingDurationAttributeCallback:: - CHIPValveConfigurationAndControlRemainingDurationAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlRemainingDurationAttributeCallback:: - ~CHIPValveConfigurationAndControlRemainingDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlRemainingDurationAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CHIPValveConfigurationAndControlCurrentStateAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlCurrentStateAttributeCallback::~CHIPValveConfigurationAndControlCurrentStateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlTargetStateAttributeCallback::CHIPValveConfigurationAndControlTargetStateAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlTargetStateAttributeCallback::~CHIPValveConfigurationAndControlTargetStateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlTargetStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CHIPValveConfigurationAndControlCurrentLevelAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::~CHIPValveConfigurationAndControlCurrentLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CHIPValveConfigurationAndControlTargetLevelAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlTargetLevelAttributeCallback::~CHIPValveConfigurationAndControlTargetLevelAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback:: - CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback:: - ~CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback:: - CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback:: - ~CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPValveConfigurationAndControlEventListAttributeCallback::CHIPValveConfigurationAndControlEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlEventListAttributeCallback::~CHIPValveConfigurationAndControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPValveConfigurationAndControlAttributeListAttributeCallback::CHIPValveConfigurationAndControlAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPValveConfigurationAndControlAttributeListAttributeCallback::~CHIPValveConfigurationAndControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPValveConfigurationAndControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback:: - CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback:: - CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalEnergyMeasurementEventListAttributeCallback::CHIPElectricalEnergyMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalEnergyMeasurementEventListAttributeCallback::~CHIPElectricalEnergyMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalEnergyMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::CHIPElectricalEnergyMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::~CHIPElectricalEnergyMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback:: - CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback:: - ~CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_programID; - jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.size())); - env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.size()), - reinterpret_cast(entry_0.programID.data())); - newElement_0_programID = newElement_0_programIDByteArray; - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_enrollmentGroup; - if (entry_0.enrollmentGroup.IsNull()) - { - newElement_0_enrollmentGroup = nullptr; - } - else - { - std::string newElement_0_enrollmentGroupClassName = "java/lang/Integer"; - std::string newElement_0_enrollmentGroupCtorSignature = "(I)V"; - jint jninewElement_0_enrollmentGroup = static_cast(entry_0.enrollmentGroup.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_enrollmentGroupClassName.c_str(), newElement_0_enrollmentGroupCtorSignature.c_str(), - jninewElement_0_enrollmentGroup, newElement_0_enrollmentGroup); - } - jobject newElement_0_randomStartMinutes; - if (entry_0.randomStartMinutes.IsNull()) - { - newElement_0_randomStartMinutes = nullptr; - } - else - { - std::string newElement_0_randomStartMinutesClassName = "java/lang/Integer"; - std::string newElement_0_randomStartMinutesCtorSignature = "(I)V"; - jint jninewElement_0_randomStartMinutes = static_cast(entry_0.randomStartMinutes.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_randomStartMinutesClassName.c_str(), newElement_0_randomStartMinutesCtorSignature.c_str(), - jninewElement_0_randomStartMinutes, newElement_0_randomStartMinutes); - } - jobject newElement_0_randomDurationMinutes; - if (entry_0.randomDurationMinutes.IsNull()) - { - newElement_0_randomDurationMinutes = nullptr; - } - else - { - std::string newElement_0_randomDurationMinutesClassName = "java/lang/Integer"; - std::string newElement_0_randomDurationMinutesCtorSignature = "(I)V"; - jint jninewElement_0_randomDurationMinutes = static_cast(entry_0.randomDurationMinutes.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_randomDurationMinutesClassName.c_str(), newElement_0_randomDurationMinutesCtorSignature.c_str(), - jninewElement_0_randomDurationMinutes, newElement_0_randomDurationMinutes); - } - - jclass loadControlProgramStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", - loadControlProgramStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); - return; - } - - jmethodID loadControlProgramStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlProgramStructStructClass_1, "", - "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &loadControlProgramStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlProgramStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); - return; - } - - newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, - newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, - newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlEventsAttributeCallback::CHIPDemandResponseLoadControlEventsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlEventsAttributeCallback::~CHIPDemandResponseLoadControlEventsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlEventsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_eventID; - jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); - env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), - reinterpret_cast(entry_0.eventID.data())); - newElement_0_eventID = newElement_0_eventIDByteArray; - jobject newElement_0_programID; - if (entry_0.programID.IsNull()) - { - newElement_0_programID = nullptr; - } - else - { - jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); - env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), - reinterpret_cast(entry_0.programID.Value().data())); - newElement_0_programID = newElement_0_programIDByteArray; - } - jobject newElement_0_control; - std::string newElement_0_controlClassName = "java/lang/Integer"; - std::string newElement_0_controlCtorSignature = "(I)V"; - jint jninewElement_0_control = static_cast(entry_0.control.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), - newElement_0_controlCtorSignature.c_str(), - jninewElement_0_control, newElement_0_control); - jobject newElement_0_deviceClass; - std::string newElement_0_deviceClassClassName = "java/lang/Long"; - std::string newElement_0_deviceClassCtorSignature = "(J)V"; - jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), - newElement_0_deviceClassCtorSignature.c_str(), - jninewElement_0_deviceClass, newElement_0_deviceClass); - jobject newElement_0_enrollmentGroup; - if (!entry_0.enrollmentGroup.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); - } - else - { - jobject newElement_0_enrollmentGroupInsideOptional; - std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), - newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, - newElement_0_enrollmentGroupInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, - newElement_0_enrollmentGroup); - } - jobject newElement_0_criticality; - std::string newElement_0_criticalityClassName = "java/lang/Integer"; - std::string newElement_0_criticalityCtorSignature = "(I)V"; - jint jninewElement_0_criticality = static_cast(entry_0.criticality); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), - newElement_0_criticalityCtorSignature.c_str(), - jninewElement_0_criticality, newElement_0_criticality); - jobject newElement_0_startTime; - if (entry_0.startTime.IsNull()) - { - newElement_0_startTime = nullptr; - } - else - { - std::string newElement_0_startTimeClassName = "java/lang/Long"; - std::string newElement_0_startTimeCtorSignature = "(J)V"; - jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), - newElement_0_startTimeCtorSignature.c_str(), - jninewElement_0_startTime, newElement_0_startTime); - } - jobject newElement_0_transitions; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); - - auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); - while (iter_newElement_0_transitions_2.Next()) - { - auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); - jobject newElement_2; - jobject newElement_2_duration; - std::string newElement_2_durationClassName = "java/lang/Integer"; - std::string newElement_2_durationCtorSignature = "(I)V"; - jint jninewElement_2_duration = static_cast(entry_2.duration); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), - newElement_2_durationCtorSignature.c_str(), - jninewElement_2_duration, newElement_2_duration); - jobject newElement_2_control; - std::string newElement_2_controlClassName = "java/lang/Integer"; - std::string newElement_2_controlCtorSignature = "(I)V"; - jint jninewElement_2_control = static_cast(entry_2.control.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), - newElement_2_controlCtorSignature.c_str(), - jninewElement_2_control, newElement_2_control); - jobject newElement_2_temperatureControl; - if (!entry_2.temperatureControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); - } - else - { - jobject newElement_2_temperatureControlInsideOptional; - jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; - if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; - if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = - static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempOffset); - } - jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; - if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; - if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = - static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset); - } - jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; - if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; - if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = - static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); - } - jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; - if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; - if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = - static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - } - - jclass temperatureControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", - temperatureControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); - return; - } - - jmethodID temperatureControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod( - env, temperatureControlStructStructClass_5, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &temperatureControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); - return; - } - - newElement_2_temperatureControlInsideOptional = - env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, - newElement_2_temperatureControlInsideOptional_coolingTempOffset, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, - newElement_2_temperatureControl); - } - jobject newElement_2_averageLoadControl; - if (!entry_2.averageLoadControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); - } - else - { - jobject newElement_2_averageLoadControlInsideOptional; - jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; - std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; - std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; - jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = - static_cast(entry_2.averageLoadControl.Value().loadAdjustment); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), - newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), - jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); - - jclass averageLoadControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", - averageLoadControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); - return; - } - - jmethodID averageLoadControlStructStructCtor_5; - err = - chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &averageLoadControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); - return; - } - - newElement_2_averageLoadControlInsideOptional = - env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, - newElement_2_averageLoadControl); - } - jobject newElement_2_dutyCycleControl; - if (!entry_2.dutyCycleControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); - } - else - { - jobject newElement_2_dutyCycleControlInsideOptional; - jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; - std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; - std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; - jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = - static_cast(entry_2.dutyCycleControl.Value().dutyCycle); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), - newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), - jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); - - jclass dutyCycleControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", - dutyCycleControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); - return; - } - - jmethodID dutyCycleControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &dutyCycleControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); - return; - } - - newElement_2_dutyCycleControlInsideOptional = - env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, - newElement_2_dutyCycleControl); - } - jobject newElement_2_powerSavingsControl; - if (!entry_2.powerSavingsControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); - } - else - { - jobject newElement_2_powerSavingsControlInsideOptional; - jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; - std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; - std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; - jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = - static_cast(entry_2.powerSavingsControl.Value().powerSavings); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), - newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), - jninewElement_2_powerSavingsControlInsideOptional_powerSavings, - newElement_2_powerSavingsControlInsideOptional_powerSavings); - - jclass powerSavingsControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", - powerSavingsControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); - return; - } - - jmethodID powerSavingsControlStructStructCtor_5; - err = - chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &powerSavingsControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); - return; - } - - newElement_2_powerSavingsControlInsideOptional = - env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, - newElement_2_powerSavingsControlInsideOptional_powerSavings); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, - newElement_2_powerSavingsControl); - } - jobject newElement_2_heatingSourceControl; - if (!entry_2.heatingSourceControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); - } - else - { - jobject newElement_2_heatingSourceControlInsideOptional; - jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; - std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; - std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; - jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = - static_cast(entry_2.heatingSourceControl.Value().heatingSource); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), - newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), - jninewElement_2_heatingSourceControlInsideOptional_heatingSource, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - - jclass heatingSourceControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", - heatingSourceControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); - return; - } - - jmethodID heatingSourceControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &heatingSourceControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); - return; - } - - newElement_2_heatingSourceControlInsideOptional = - env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, - newElement_2_heatingSourceControl); - } - - jclass loadControlEventTransitionStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", - loadControlEventTransitionStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); - return; - } - - jmethodID loadControlEventTransitionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;)V", - &loadControlEventTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct constructor"); - return; - } - - newElement_2 = env->NewObject( - loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, - newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, - newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); - chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); - } - - jclass loadControlEventStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", - loadControlEventStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); - return; - } - - jmethodID loadControlEventStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, loadControlEventStructStructClass_1, "", - "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/" - "lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &loadControlEventStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, - newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, - newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlActiveEventsAttributeCallback::CHIPDemandResponseLoadControlActiveEventsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlActiveEventsAttributeCallback::~CHIPDemandResponseLoadControlActiveEventsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlActiveEventsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_eventID; - jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); - env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), - reinterpret_cast(entry_0.eventID.data())); - newElement_0_eventID = newElement_0_eventIDByteArray; - jobject newElement_0_programID; - if (entry_0.programID.IsNull()) - { - newElement_0_programID = nullptr; - } - else - { - jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); - env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), - reinterpret_cast(entry_0.programID.Value().data())); - newElement_0_programID = newElement_0_programIDByteArray; - } - jobject newElement_0_control; - std::string newElement_0_controlClassName = "java/lang/Integer"; - std::string newElement_0_controlCtorSignature = "(I)V"; - jint jninewElement_0_control = static_cast(entry_0.control.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), - newElement_0_controlCtorSignature.c_str(), - jninewElement_0_control, newElement_0_control); - jobject newElement_0_deviceClass; - std::string newElement_0_deviceClassClassName = "java/lang/Long"; - std::string newElement_0_deviceClassCtorSignature = "(J)V"; - jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), - newElement_0_deviceClassCtorSignature.c_str(), - jninewElement_0_deviceClass, newElement_0_deviceClass); - jobject newElement_0_enrollmentGroup; - if (!entry_0.enrollmentGroup.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); - } - else - { - jobject newElement_0_enrollmentGroupInsideOptional; - std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), - newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, - newElement_0_enrollmentGroupInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, - newElement_0_enrollmentGroup); - } - jobject newElement_0_criticality; - std::string newElement_0_criticalityClassName = "java/lang/Integer"; - std::string newElement_0_criticalityCtorSignature = "(I)V"; - jint jninewElement_0_criticality = static_cast(entry_0.criticality); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), - newElement_0_criticalityCtorSignature.c_str(), - jninewElement_0_criticality, newElement_0_criticality); - jobject newElement_0_startTime; - if (entry_0.startTime.IsNull()) - { - newElement_0_startTime = nullptr; - } - else - { - std::string newElement_0_startTimeClassName = "java/lang/Long"; - std::string newElement_0_startTimeCtorSignature = "(J)V"; - jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), - newElement_0_startTimeCtorSignature.c_str(), - jninewElement_0_startTime, newElement_0_startTime); - } - jobject newElement_0_transitions; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); - - auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); - while (iter_newElement_0_transitions_2.Next()) - { - auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); - jobject newElement_2; - jobject newElement_2_duration; - std::string newElement_2_durationClassName = "java/lang/Integer"; - std::string newElement_2_durationCtorSignature = "(I)V"; - jint jninewElement_2_duration = static_cast(entry_2.duration); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), - newElement_2_durationCtorSignature.c_str(), - jninewElement_2_duration, newElement_2_duration); - jobject newElement_2_control; - std::string newElement_2_controlClassName = "java/lang/Integer"; - std::string newElement_2_controlCtorSignature = "(I)V"; - jint jninewElement_2_control = static_cast(entry_2.control.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), - newElement_2_controlCtorSignature.c_str(), - jninewElement_2_control, newElement_2_control); - jobject newElement_2_temperatureControl; - if (!entry_2.temperatureControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); - } - else - { - jobject newElement_2_temperatureControlInsideOptional; - jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; - if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; - if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = - static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempOffset); - } - jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; - if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; - if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = - static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset); - } - jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; - if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; - if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = - static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); - } - jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; - if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional( - nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - } - else - { - jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; - if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) - { - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; - } - else - { - std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = - "java/lang/Integer"; - std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = - "(I)V"; - jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = - static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName.c_str(), - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature.c_str(), - jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional( - newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - } - - jclass temperatureControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", - temperatureControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); - return; - } - - jmethodID temperatureControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod( - env, temperatureControlStructStructClass_5, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &temperatureControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); - return; - } - - newElement_2_temperatureControlInsideOptional = - env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, - newElement_2_temperatureControlInsideOptional_coolingTempOffset, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, - newElement_2_temperatureControl); - } - jobject newElement_2_averageLoadControl; - if (!entry_2.averageLoadControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); - } - else - { - jobject newElement_2_averageLoadControlInsideOptional; - jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; - std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; - std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; - jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = - static_cast(entry_2.averageLoadControl.Value().loadAdjustment); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), - newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), - jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); - - jclass averageLoadControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", - averageLoadControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); - return; - } - - jmethodID averageLoadControlStructStructCtor_5; - err = - chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &averageLoadControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); - return; - } - - newElement_2_averageLoadControlInsideOptional = - env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, - newElement_2_averageLoadControl); - } - jobject newElement_2_dutyCycleControl; - if (!entry_2.dutyCycleControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); - } - else - { - jobject newElement_2_dutyCycleControlInsideOptional; - jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; - std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; - std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; - jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = - static_cast(entry_2.dutyCycleControl.Value().dutyCycle); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), - newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), - jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); - - jclass dutyCycleControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", - dutyCycleControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); - return; - } - - jmethodID dutyCycleControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &dutyCycleControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); - return; - } - - newElement_2_dutyCycleControlInsideOptional = - env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, - newElement_2_dutyCycleControl); - } - jobject newElement_2_powerSavingsControl; - if (!entry_2.powerSavingsControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); - } - else - { - jobject newElement_2_powerSavingsControlInsideOptional; - jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; - std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; - std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; - jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = - static_cast(entry_2.powerSavingsControl.Value().powerSavings); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), - newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), - jninewElement_2_powerSavingsControlInsideOptional_powerSavings, - newElement_2_powerSavingsControlInsideOptional_powerSavings); - - jclass powerSavingsControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", - powerSavingsControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); - return; - } - - jmethodID powerSavingsControlStructStructCtor_5; - err = - chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", &powerSavingsControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); - return; - } - - newElement_2_powerSavingsControlInsideOptional = - env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, - newElement_2_powerSavingsControlInsideOptional_powerSavings); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, - newElement_2_powerSavingsControl); - } - jobject newElement_2_heatingSourceControl; - if (!entry_2.heatingSourceControl.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); - } - else - { - jobject newElement_2_heatingSourceControlInsideOptional; - jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; - std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; - std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; - jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = - static_cast(entry_2.heatingSourceControl.Value().heatingSource); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), - newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), - jninewElement_2_heatingSourceControlInsideOptional_heatingSource, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - - jclass heatingSourceControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", - heatingSourceControlStructStructClass_5); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); - return; - } - - jmethodID heatingSourceControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &heatingSourceControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); - return; - } - - newElement_2_heatingSourceControlInsideOptional = - env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, - newElement_2_heatingSourceControl); - } - - jclass loadControlEventTransitionStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", - loadControlEventTransitionStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); - return; - } - - jmethodID loadControlEventTransitionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;)V", - &loadControlEventTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct constructor"); - return; - } - - newElement_2 = env->NewObject( - loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, - newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, - newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); - chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); - } - - jclass loadControlEventStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", - loadControlEventStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); - return; - } - - jmethodID loadControlEventStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, loadControlEventStructStructClass_1, "", - "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/" - "lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &loadControlEventStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, - newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, - newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback:: - CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback:: - ~CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback:: - CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback:: - ~CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlEventListAttributeCallback::CHIPDemandResponseLoadControlEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlEventListAttributeCallback::~CHIPDemandResponseLoadControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDemandResponseLoadControlAttributeListAttributeCallback::CHIPDemandResponseLoadControlAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDemandResponseLoadControlAttributeListAttributeCallback::~CHIPDemandResponseLoadControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDemandResponseLoadControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback:: - CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback:: - ~CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::Nullable> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - jobject newElement_1_minPower; - std::string newElement_1_minPowerClassName = "java/lang/Long"; - std::string newElement_1_minPowerCtorSignature = "(J)V"; - jlong jninewElement_1_minPower = static_cast(entry_1.minPower); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_minPowerClassName.c_str(), - newElement_1_minPowerCtorSignature.c_str(), - jninewElement_1_minPower, newElement_1_minPower); - jobject newElement_1_maxPower; - std::string newElement_1_maxPowerClassName = "java/lang/Long"; - std::string newElement_1_maxPowerCtorSignature = "(J)V"; - jlong jninewElement_1_maxPower = static_cast(entry_1.maxPower); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_maxPowerClassName.c_str(), - newElement_1_maxPowerCtorSignature.c_str(), - jninewElement_1_maxPower, newElement_1_maxPower); - jobject newElement_1_minDuration; - std::string newElement_1_minDurationClassName = "java/lang/Long"; - std::string newElement_1_minDurationCtorSignature = "(J)V"; - jlong jninewElement_1_minDuration = static_cast(entry_1.minDuration); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_minDurationClassName.c_str(), - newElement_1_minDurationCtorSignature.c_str(), - jninewElement_1_minDuration, newElement_1_minDuration); - jobject newElement_1_maxDuration; - std::string newElement_1_maxDurationClassName = "java/lang/Long"; - std::string newElement_1_maxDurationCtorSignature = "(J)V"; - jlong jninewElement_1_maxDuration = static_cast(entry_1.maxDuration); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_maxDurationClassName.c_str(), - newElement_1_maxDurationCtorSignature.c_str(), - jninewElement_1_maxDuration, newElement_1_maxDuration); - - jclass powerAdjustStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", - powerAdjustStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); - return; - } - - jmethodID powerAdjustStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, powerAdjustStructStructClass_2, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", &powerAdjustStructStructCtor_2); - if (err != CHIP_NO_ERROR || powerAdjustStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); - return; - } - - newElement_1 = env->NewObject(powerAdjustStructStructClass_2, powerAdjustStructStructCtor_2, newElement_1_minPower, - newElement_1_maxPower, newElement_1_minDuration, newElement_1_maxDuration); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::~CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::~CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementEventListAttributeCallback::CHIPDeviceEnergyManagementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementEventListAttributeCallback::~CHIPDeviceEnergyManagementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementAttributeListAttributeCallback::CHIPDeviceEnergyManagementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementAttributeListAttributeCallback::~CHIPDeviceEnergyManagementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseStateAttributeCallback::CHIPEnergyEvseStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseStateAttributeCallback::~CHIPEnergyEvseStateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseChargingEnabledUntilAttributeCallback::CHIPEnergyEvseChargingEnabledUntilAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseChargingEnabledUntilAttributeCallback::~CHIPEnergyEvseChargingEnabledUntilAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseChargingEnabledUntilAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::CHIPEnergyEvseDischargingEnabledUntilAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::~CHIPEnergyEvseDischargingEnabledUntilAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseNextChargeStartTimeAttributeCallback::CHIPEnergyEvseNextChargeStartTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseNextChargeStartTimeAttributeCallback::~CHIPEnergyEvseNextChargeStartTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseNextChargeStartTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::CHIPEnergyEvseNextChargeTargetTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::~CHIPEnergyEvseNextChargeTargetTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::~CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::CHIPEnergyEvseNextChargeTargetSoCAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::~CHIPEnergyEvseNextChargeTargetSoCAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::~CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseStateOfChargeAttributeCallback::CHIPEnergyEvseStateOfChargeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseStateOfChargeAttributeCallback::~CHIPEnergyEvseStateOfChargeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseStateOfChargeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseBatteryCapacityAttributeCallback::CHIPEnergyEvseBatteryCapacityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseBatteryCapacityAttributeCallback::~CHIPEnergyEvseBatteryCapacityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseBatteryCapacityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseVehicleIDAttributeCallback::CHIPEnergyEvseVehicleIDAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseVehicleIDAttributeCallback::~CHIPEnergyEvseVehicleIDAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseVehicleIDAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseSessionIDAttributeCallback::CHIPEnergyEvseSessionIDAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseSessionIDAttributeCallback::~CHIPEnergyEvseSessionIDAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseSessionIDAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseSessionDurationAttributeCallback::CHIPEnergyEvseSessionDurationAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseSessionDurationAttributeCallback::~CHIPEnergyEvseSessionDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseSessionDurationAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseSessionEnergyChargedAttributeCallback::CHIPEnergyEvseSessionEnergyChargedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseSessionEnergyChargedAttributeCallback::~CHIPEnergyEvseSessionEnergyChargedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseSessionEnergyChargedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::CHIPEnergyEvseSessionEnergyDischargedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::~CHIPEnergyEvseSessionEnergyDischargedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseGeneratedCommandListAttributeCallback::CHIPEnergyEvseGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseGeneratedCommandListAttributeCallback::~CHIPEnergyEvseGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseAcceptedCommandListAttributeCallback::CHIPEnergyEvseAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseAcceptedCommandListAttributeCallback::~CHIPEnergyEvseAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseEventListAttributeCallback::CHIPEnergyEvseEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseEventListAttributeCallback::~CHIPEnergyEvseEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseAttributeListAttributeCallback::CHIPEnergyEvseAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseAttributeListAttributeCallback::~CHIPEnergyEvseAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceEnergyBalancesAttributeCallback::CHIPEnergyPreferenceEnergyBalancesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceEnergyBalancesAttributeCallback::~CHIPEnergyPreferenceEnergyBalancesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceEnergyBalancesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_step; - std::string newElement_0_stepClassName = "java/lang/Integer"; - std::string newElement_0_stepCtorSignature = "(I)V"; - jint jninewElement_0_step = static_cast(entry_0.step); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stepClassName.c_str(), newElement_0_stepCtorSignature.c_str(), jninewElement_0_step, newElement_0_step); - jobject newElement_0_label; - if (!entry_0.label.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); - } - else - { - jobject newElement_0_labelInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value(), newElement_0_labelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); - } - - jclass balanceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); - return; - } - - jmethodID balanceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, balanceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &balanceStructStructCtor_1); - if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); - return; - } - - newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceEnergyPrioritiesAttributeCallback::CHIPEnergyPreferenceEnergyPrioritiesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceEnergyPrioritiesAttributeCallback::~CHIPEnergyPreferenceEnergyPrioritiesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceEnergyPrioritiesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceLowPowerModeSensitivitiesAttributeCallback::CHIPEnergyPreferenceLowPowerModeSensitivitiesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceLowPowerModeSensitivitiesAttributeCallback::~CHIPEnergyPreferenceLowPowerModeSensitivitiesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceLowPowerModeSensitivitiesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_step; - std::string newElement_0_stepClassName = "java/lang/Integer"; - std::string newElement_0_stepCtorSignature = "(I)V"; - jint jninewElement_0_step = static_cast(entry_0.step); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stepClassName.c_str(), newElement_0_stepCtorSignature.c_str(), jninewElement_0_step, newElement_0_step); - jobject newElement_0_label; - if (!entry_0.label.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); - } - else - { - jobject newElement_0_labelInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value(), newElement_0_labelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); - } - - jclass balanceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); - return; - } - - jmethodID balanceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, balanceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &balanceStructStructCtor_1); - if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); - return; - } - - newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceGeneratedCommandListAttributeCallback::CHIPEnergyPreferenceGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceGeneratedCommandListAttributeCallback::~CHIPEnergyPreferenceGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceAcceptedCommandListAttributeCallback::CHIPEnergyPreferenceAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceAcceptedCommandListAttributeCallback::~CHIPEnergyPreferenceAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceEventListAttributeCallback::CHIPEnergyPreferenceEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceEventListAttributeCallback::~CHIPEnergyPreferenceEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyPreferenceAttributeListAttributeCallback::CHIPEnergyPreferenceAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyPreferenceAttributeListAttributeCallback::~CHIPEnergyPreferenceAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyPreferenceAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseModeSupportedModesAttributeCallback::CHIPEnergyEvseModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeSupportedModesAttributeCallback::~CHIPEnergyEvseModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseModeStartUpModeAttributeCallback::CHIPEnergyEvseModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeStartUpModeAttributeCallback::~CHIPEnergyEvseModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseModeOnModeAttributeCallback::CHIPEnergyEvseModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeOnModeAttributeCallback::~CHIPEnergyEvseModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPEnergyEvseModeGeneratedCommandListAttributeCallback::CHIPEnergyEvseModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeGeneratedCommandListAttributeCallback::~CHIPEnergyEvseModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseModeAcceptedCommandListAttributeCallback::CHIPEnergyEvseModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeAcceptedCommandListAttributeCallback::~CHIPEnergyEvseModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseModeEventListAttributeCallback::CHIPEnergyEvseModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeEventListAttributeCallback::~CHIPEnergyEvseModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEnergyEvseModeAttributeListAttributeCallback::CHIPEnergyEvseModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEnergyEvseModeAttributeListAttributeCallback::~CHIPEnergyEvseModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEnergyEvseModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementModeSupportedModesAttributeCallback::CHIPDeviceEnergyManagementModeSupportedModesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeSupportedModesAttributeCallback::~CHIPDeviceEnergyManagementModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::DeviceEnergyManagementMode::Structs::ModeOptionStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct", - modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementModeStartUpModeAttributeCallback::CHIPDeviceEnergyManagementModeStartUpModeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeStartUpModeAttributeCallback::~CHIPDeviceEnergyManagementModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDeviceEnergyManagementModeOnModeAttributeCallback::CHIPDeviceEnergyManagementModeOnModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeOnModeAttributeCallback::~CHIPDeviceEnergyManagementModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeOnModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDeviceEnergyManagementModeGeneratedCommandListAttributeCallback:: - CHIPDeviceEnergyManagementModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeGeneratedCommandListAttributeCallback:: - ~CHIPDeviceEnergyManagementModeGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementModeAcceptedCommandListAttributeCallback:: - CHIPDeviceEnergyManagementModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeAcceptedCommandListAttributeCallback:: - ~CHIPDeviceEnergyManagementModeAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementModeEventListAttributeCallback::CHIPDeviceEnergyManagementModeEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeEventListAttributeCallback::~CHIPDeviceEnergyManagementModeEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDeviceEnergyManagementModeAttributeListAttributeCallback::CHIPDeviceEnergyManagementModeAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDeviceEnergyManagementModeAttributeListAttributeCallback::~CHIPDeviceEnergyManagementModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDeviceEnergyManagementModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockLockStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::CHIPDoorLockAliroReaderVerificationKeyAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::~CHIPDoorLockAliroReaderVerificationKeyAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::~CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback:: - CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback:: - ~CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::CHIPDoorLockAliroGroupResolvingKeyAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::~CHIPDoorLockAliroGroupResolvingKeyAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback:: - CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback:: - ~CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: - CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: - ~CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: - CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: - ~CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: - CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: - CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback:: - ~CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback:: - ~CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: - CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: - ~CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: - CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: - ~CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPumpConfigurationAndControlEventListAttributeCallback::CHIPPumpConfigurationAndControlEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlEventListAttributeCallback::~CHIPPumpConfigurationAndControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CHIPPumpConfigurationAndControlAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPumpConfigurationAndControlAttributeListAttributeCallback::~CHIPPumpConfigurationAndControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatLocalTemperatureAttributeCallback::CHIPThermostatLocalTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatLocalTemperatureAttributeCallback::~CHIPThermostatLocalTemperatureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatOutdoorTemperatureAttributeCallback::CHIPThermostatOutdoorTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatOutdoorTemperatureAttributeCallback::~CHIPThermostatOutdoorTemperatureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::~CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatSetpointChangeAmountAttributeCallback::CHIPThermostatSetpointChangeAmountAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatSetpointChangeAmountAttributeCallback::~CHIPThermostatSetpointChangeAmountAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatOccupiedSetbackAttributeCallback::CHIPThermostatOccupiedSetbackAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatOccupiedSetbackAttributeCallback::~CHIPThermostatOccupiedSetbackAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatOccupiedSetbackMinAttributeCallback::CHIPThermostatOccupiedSetbackMinAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatOccupiedSetbackMinAttributeCallback::~CHIPThermostatOccupiedSetbackMinAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatOccupiedSetbackMaxAttributeCallback::CHIPThermostatOccupiedSetbackMaxAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatOccupiedSetbackMaxAttributeCallback::~CHIPThermostatOccupiedSetbackMaxAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatUnoccupiedSetbackAttributeCallback::CHIPThermostatUnoccupiedSetbackAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUnoccupiedSetbackAttributeCallback::~CHIPThermostatUnoccupiedSetbackAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CHIPThermostatUnoccupiedSetbackMinAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUnoccupiedSetbackMinAttributeCallback::~CHIPThermostatUnoccupiedSetbackMinAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::~CHIPThermostatUnoccupiedSetbackMaxAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatACCoilTemperatureAttributeCallback::CHIPThermostatACCoilTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatACCoilTemperatureAttributeCallback::~CHIPThermostatACCoilTemperatureAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatPresetTypesAttributeCallback::CHIPThermostatPresetTypesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatPresetTypesAttributeCallback::~CHIPThermostatPresetTypesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatPresetTypesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_presetScenario; - std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; - std::string newElement_0_presetScenarioCtorSignature = "(I)V"; - jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_presetScenarioClassName.c_str(), - newElement_0_presetScenarioCtorSignature.c_str(), - jninewElement_0_presetScenario, newElement_0_presetScenario); - jobject newElement_0_numberOfPresets; - std::string newElement_0_numberOfPresetsClassName = "java/lang/Integer"; - std::string newElement_0_numberOfPresetsCtorSignature = "(I)V"; - jint jninewElement_0_numberOfPresets = static_cast(entry_0.numberOfPresets); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_numberOfPresetsClassName.c_str(), - newElement_0_numberOfPresetsCtorSignature.c_str(), - jninewElement_0_numberOfPresets, newElement_0_numberOfPresets); - jobject newElement_0_presetTypeFeatures; - std::string newElement_0_presetTypeFeaturesClassName = "java/lang/Integer"; - std::string newElement_0_presetTypeFeaturesCtorSignature = "(I)V"; - jint jninewElement_0_presetTypeFeatures = static_cast(entry_0.presetTypeFeatures.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_presetTypeFeaturesClassName.c_str(), newElement_0_presetTypeFeaturesCtorSignature.c_str(), - jninewElement_0_presetTypeFeatures, newElement_0_presetTypeFeatures); - - jclass presetTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); - return; - } - - jmethodID presetTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, presetTypeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &presetTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); - return; - } - - newElement_0 = env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, - newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatScheduleTypesAttributeCallback::CHIPThermostatScheduleTypesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatScheduleTypesAttributeCallback::~CHIPThermostatScheduleTypesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatScheduleTypesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_systemMode; - std::string newElement_0_systemModeClassName = "java/lang/Integer"; - std::string newElement_0_systemModeCtorSignature = "(I)V"; - jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), - newElement_0_systemModeCtorSignature.c_str(), - jninewElement_0_systemMode, newElement_0_systemMode); - jobject newElement_0_numberOfSchedules; - std::string newElement_0_numberOfSchedulesClassName = "java/lang/Integer"; - std::string newElement_0_numberOfSchedulesCtorSignature = "(I)V"; - jint jninewElement_0_numberOfSchedules = static_cast(entry_0.numberOfSchedules); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_numberOfSchedulesClassName.c_str(), newElement_0_numberOfSchedulesCtorSignature.c_str(), - jninewElement_0_numberOfSchedules, newElement_0_numberOfSchedules); - jobject newElement_0_scheduleTypeFeatures; - std::string newElement_0_scheduleTypeFeaturesClassName = "java/lang/Integer"; - std::string newElement_0_scheduleTypeFeaturesCtorSignature = "(I)V"; - jint jninewElement_0_scheduleTypeFeatures = static_cast(entry_0.scheduleTypeFeatures.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_scheduleTypeFeaturesClassName.c_str(), newElement_0_scheduleTypeFeaturesCtorSignature.c_str(), - jninewElement_0_scheduleTypeFeatures, newElement_0_scheduleTypeFeatures); - - jclass scheduleTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", scheduleTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); - return; - } - - jmethodID scheduleTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTypeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &scheduleTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); - return; - } - - newElement_0 = env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, - newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::~CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatActivePresetHandleAttributeCallback::CHIPThermostatActivePresetHandleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatActivePresetHandleAttributeCallback::~CHIPThermostatActivePresetHandleAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatActivePresetHandleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatActiveScheduleHandleAttributeCallback::CHIPThermostatActiveScheduleHandleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatActiveScheduleHandleAttributeCallback::~CHIPThermostatActiveScheduleHandleAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatActiveScheduleHandleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatPresetsAttributeCallback::CHIPThermostatPresetsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatPresetsAttributeCallback::~CHIPThermostatPresetsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatPresetsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_presetHandle; - if (entry_0.presetHandle.IsNull()) - { - newElement_0_presetHandle = nullptr; - } - else - { - jbyteArray newElement_0_presetHandleByteArray = - env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); - env->SetByteArrayRegion(newElement_0_presetHandleByteArray, 0, static_cast(entry_0.presetHandle.Value().size()), - reinterpret_cast(entry_0.presetHandle.Value().data())); - newElement_0_presetHandle = newElement_0_presetHandleByteArray; - } - jobject newElement_0_presetScenario; - std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; - std::string newElement_0_presetScenarioCtorSignature = "(I)V"; - jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_presetScenarioClassName.c_str(), - newElement_0_presetScenarioCtorSignature.c_str(), - jninewElement_0_presetScenario, newElement_0_presetScenario); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - if (entry_0.name.Value().IsNull()) - { - newElement_0_nameInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value().Value(), - newElement_0_nameInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_coolingSetpoint; - if (!entry_0.coolingSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_coolingSetpoint); - } - else - { - jobject newElement_0_coolingSetpointInsideOptional; - std::string newElement_0_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_coolingSetpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_coolingSetpointInsideOptional = static_cast(entry_0.coolingSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_coolingSetpointInsideOptionalClassName.c_str(), - newElement_0_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_coolingSetpointInsideOptional, - newElement_0_coolingSetpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_coolingSetpointInsideOptional, - newElement_0_coolingSetpoint); - } - jobject newElement_0_heatingSetpoint; - if (!entry_0.heatingSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_heatingSetpoint); - } - else - { - jobject newElement_0_heatingSetpointInsideOptional; - std::string newElement_0_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_heatingSetpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_heatingSetpointInsideOptional = static_cast(entry_0.heatingSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_heatingSetpointInsideOptionalClassName.c_str(), - newElement_0_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_heatingSetpointInsideOptional, - newElement_0_heatingSetpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_heatingSetpointInsideOptional, - newElement_0_heatingSetpoint); - } - jobject newElement_0_builtIn; - if (entry_0.builtIn.IsNull()) - { - newElement_0_builtIn = nullptr; - } - else - { - std::string newElement_0_builtInClassName = "java/lang/Boolean"; - std::string newElement_0_builtInCtorSignature = "(Z)V"; - jboolean jninewElement_0_builtIn = static_cast(entry_0.builtIn.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_builtInClassName.c_str(), - newElement_0_builtInCtorSignature.c_str(), - jninewElement_0_builtIn, newElement_0_builtIn); - } - - jclass presetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", - presetStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); - return; - } - - jmethodID presetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, presetStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", - &presetStructStructCtor_1); - if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); - return; - } - - newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, - newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, - newElement_0_heatingSetpoint, newElement_0_builtIn); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatSchedulesAttributeCallback::CHIPThermostatSchedulesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatSchedulesAttributeCallback::~CHIPThermostatSchedulesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatSchedulesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_scheduleHandle; - if (entry_0.scheduleHandle.IsNull()) - { - newElement_0_scheduleHandle = nullptr; - } - else - { - jbyteArray newElement_0_scheduleHandleByteArray = - env->NewByteArray(static_cast(entry_0.scheduleHandle.Value().size())); - env->SetByteArrayRegion(newElement_0_scheduleHandleByteArray, 0, - static_cast(entry_0.scheduleHandle.Value().size()), - reinterpret_cast(entry_0.scheduleHandle.Value().data())); - newElement_0_scheduleHandle = newElement_0_scheduleHandleByteArray; - } - jobject newElement_0_systemMode; - std::string newElement_0_systemModeClassName = "java/lang/Integer"; - std::string newElement_0_systemModeCtorSignature = "(I)V"; - jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), - newElement_0_systemModeCtorSignature.c_str(), - jninewElement_0_systemMode, newElement_0_systemMode); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_presetHandle; - if (!entry_0.presetHandle.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_presetHandle); - } - else - { - jobject newElement_0_presetHandleInsideOptional; - jbyteArray newElement_0_presetHandleInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); - env->SetByteArrayRegion(newElement_0_presetHandleInsideOptionalByteArray, 0, - static_cast(entry_0.presetHandle.Value().size()), - reinterpret_cast(entry_0.presetHandle.Value().data())); - newElement_0_presetHandleInsideOptional = newElement_0_presetHandleInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(newElement_0_presetHandleInsideOptional, newElement_0_presetHandle); - } - jobject newElement_0_transitions; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); - - auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); - while (iter_newElement_0_transitions_2.Next()) - { - auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); - jobject newElement_2; - jobject newElement_2_dayOfWeek; - std::string newElement_2_dayOfWeekClassName = "java/lang/Integer"; - std::string newElement_2_dayOfWeekCtorSignature = "(I)V"; - jint jninewElement_2_dayOfWeek = static_cast(entry_2.dayOfWeek.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_dayOfWeekClassName.c_str(), - newElement_2_dayOfWeekCtorSignature.c_str(), - jninewElement_2_dayOfWeek, newElement_2_dayOfWeek); - jobject newElement_2_transitionTime; - std::string newElement_2_transitionTimeClassName = "java/lang/Integer"; - std::string newElement_2_transitionTimeCtorSignature = "(I)V"; - jint jninewElement_2_transitionTime = static_cast(entry_2.transitionTime); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_transitionTimeClassName.c_str(), - newElement_2_transitionTimeCtorSignature.c_str(), - jninewElement_2_transitionTime, newElement_2_transitionTime); - jobject newElement_2_presetHandle; - if (!entry_2.presetHandle.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_presetHandle); - } - else - { - jobject newElement_2_presetHandleInsideOptional; - jbyteArray newElement_2_presetHandleInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_2.presetHandle.Value().size())); - env->SetByteArrayRegion(newElement_2_presetHandleInsideOptionalByteArray, 0, - static_cast(entry_2.presetHandle.Value().size()), - reinterpret_cast(entry_2.presetHandle.Value().data())); - newElement_2_presetHandleInsideOptional = newElement_2_presetHandleInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(newElement_2_presetHandleInsideOptional, - newElement_2_presetHandle); - } - jobject newElement_2_systemMode; - if (!entry_2.systemMode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_systemMode); - } - else - { - jobject newElement_2_systemModeInsideOptional; - std::string newElement_2_systemModeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_systemModeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_systemModeInsideOptional = static_cast(entry_2.systemMode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_systemModeInsideOptionalClassName.c_str(), - newElement_2_systemModeInsideOptionalCtorSignature.c_str(), jninewElement_2_systemModeInsideOptional, - newElement_2_systemModeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_systemModeInsideOptional, newElement_2_systemMode); - } - jobject newElement_2_coolingSetpoint; - if (!entry_2.coolingSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_coolingSetpoint); - } - else - { - jobject newElement_2_coolingSetpointInsideOptional; - std::string newElement_2_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_coolingSetpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_coolingSetpointInsideOptional = static_cast(entry_2.coolingSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_coolingSetpointInsideOptionalClassName.c_str(), - newElement_2_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_coolingSetpointInsideOptional, - newElement_2_coolingSetpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_coolingSetpointInsideOptional, - newElement_2_coolingSetpoint); - } - jobject newElement_2_heatingSetpoint; - if (!entry_2.heatingSetpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSetpoint); - } - else - { - jobject newElement_2_heatingSetpointInsideOptional; - std::string newElement_2_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_heatingSetpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_heatingSetpointInsideOptional = static_cast(entry_2.heatingSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_heatingSetpointInsideOptionalClassName.c_str(), - newElement_2_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_heatingSetpointInsideOptional, - newElement_2_heatingSetpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSetpointInsideOptional, - newElement_2_heatingSetpoint); - } - - jclass scheduleTransitionStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", - scheduleTransitionStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); - return; - } - - jmethodID scheduleTransitionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/" - "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &scheduleTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); - return; - } - - newElement_2 = env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, - newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, - newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); - chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); - } - jobject newElement_0_builtIn; - if (!entry_0.builtIn.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_builtIn); - } - else - { - jobject newElement_0_builtInInsideOptional; - if (entry_0.builtIn.Value().IsNull()) - { - newElement_0_builtInInsideOptional = nullptr; - } - else - { - std::string newElement_0_builtInInsideOptionalClassName = "java/lang/Boolean"; - std::string newElement_0_builtInInsideOptionalCtorSignature = "(Z)V"; - jboolean jninewElement_0_builtInInsideOptional = static_cast(entry_0.builtIn.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_builtInInsideOptionalClassName.c_str(), newElement_0_builtInInsideOptionalCtorSignature.c_str(), - jninewElement_0_builtInInsideOptional, newElement_0_builtInInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_builtInInsideOptional, newElement_0_builtIn); - } - - jclass scheduleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); - return; - } - - jmethodID scheduleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, scheduleStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;)V", - &scheduleStructStructCtor_1); - if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); - return; - } - - newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, newElement_0_scheduleHandle, - newElement_0_systemMode, newElement_0_name, newElement_0_presetHandle, - newElement_0_transitions, newElement_0_builtIn); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::~CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatGeneratedCommandListAttributeCallback::~CHIPThermostatGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatAcceptedCommandListAttributeCallback::CHIPThermostatAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatAcceptedCommandListAttributeCallback::~CHIPThermostatAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatEventListAttributeCallback::CHIPThermostatEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatEventListAttributeCallback::~CHIPThermostatEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatAttributeListAttributeCallback::CHIPThermostatAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatAttributeListAttributeCallback::~CHIPThermostatAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFanControlPercentSettingAttributeCallback::CHIPFanControlPercentSettingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlPercentSettingAttributeCallback::~CHIPFanControlPercentSettingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFanControlSpeedSettingAttributeCallback::CHIPFanControlSpeedSettingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlSpeedSettingAttributeCallback::~CHIPFanControlSpeedSettingAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFanControlGeneratedCommandListAttributeCallback::CHIPFanControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlGeneratedCommandListAttributeCallback::~CHIPFanControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFanControlAcceptedCommandListAttributeCallback::CHIPFanControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlAcceptedCommandListAttributeCallback::~CHIPFanControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFanControlEventListAttributeCallback::CHIPFanControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlEventListAttributeCallback::~CHIPFanControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFanControlAttributeListAttributeCallback::CHIPFanControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFanControlAttributeListAttributeCallback::~CHIPFanControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPColorControlNumberOfPrimariesAttributeCallback::CHIPColorControlNumberOfPrimariesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlNumberOfPrimariesAttributeCallback::~CHIPColorControlNumberOfPrimariesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary1IntensityAttributeCallback::CHIPColorControlPrimary1IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary1IntensityAttributeCallback::~CHIPColorControlPrimary1IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary2IntensityAttributeCallback::CHIPColorControlPrimary2IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary2IntensityAttributeCallback::~CHIPColorControlPrimary2IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary3IntensityAttributeCallback::CHIPColorControlPrimary3IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary3IntensityAttributeCallback::~CHIPColorControlPrimary3IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary4IntensityAttributeCallback::CHIPColorControlPrimary4IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary4IntensityAttributeCallback::~CHIPColorControlPrimary4IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary5IntensityAttributeCallback::CHIPColorControlPrimary5IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary5IntensityAttributeCallback::~CHIPColorControlPrimary5IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlPrimary6IntensityAttributeCallback::CHIPColorControlPrimary6IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlPrimary6IntensityAttributeCallback::~CHIPColorControlPrimary6IntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlColorPointRIntensityAttributeCallback::CHIPColorControlColorPointRIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlColorPointRIntensityAttributeCallback::~CHIPColorControlColorPointRIntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlColorPointGIntensityAttributeCallback::CHIPColorControlColorPointGIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlColorPointGIntensityAttributeCallback::~CHIPColorControlColorPointGIntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPointBIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPointBIntensityAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback:: - ~CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfigurationLampRatedHoursAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurationLampRatedHoursAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfigurationLampBurnHoursAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfigurationLampBurnHoursAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfigurationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfigurationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: - CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: - CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidityMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensingGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback:: - CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback:: - ~CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback:: - CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback:: - ~CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: - CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: - ~CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CHIPOzoneConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementEventListAttributeCallback::~CHIPOzoneConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::~CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CHIPPm25ConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementEventListAttributeCallback::~CHIPPm25ConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback:: - CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback:: - ~CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CHIPPm1ConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementEventListAttributeCallback::~CHIPPm1ConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CHIPPm10ConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementEventListAttributeCallback::~CHIPPm10ConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterPeakMeasuredValueAttributeCallbackType>(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast( - context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAverageMeasuredValueAttributeCallbackType>(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback:: - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback:: - ~CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback:: - CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback:: - ~CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback:: - ~CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback:: - CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback:: - CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRadonConcentrationMeasurementEventListAttributeCallback::CHIPRadonConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementEventListAttributeCallback::~CHIPRadonConcentrationMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CHIPRadonConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::~CHIPRadonConcentrationMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPChannelChannelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_majorNumber; - std::string newElement_0_majorNumberClassName = "java/lang/Integer"; - std::string newElement_0_majorNumberCtorSignature = "(I)V"; - jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), - newElement_0_majorNumberCtorSignature.c_str(), - jninewElement_0_majorNumber, newElement_0_majorNumber); - jobject newElement_0_minorNumber; - std::string newElement_0_minorNumberClassName = "java/lang/Integer"; - std::string newElement_0_minorNumberCtorSignature = "(I)V"; - jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), - newElement_0_minorNumberCtorSignature.c_str(), - jninewElement_0_minorNumber, newElement_0_minorNumber); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_callSign; - if (!entry_0.callSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); - } - else - { - jobject newElement_0_callSignInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); - } - jobject newElement_0_affiliateCallSign; - if (!entry_0.affiliateCallSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); - } - else - { - jobject newElement_0_affiliateCallSignInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.affiliateCallSign.Value(), - newElement_0_affiliateCallSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, - newElement_0_affiliateCallSign); - } - jobject newElement_0_identifier; - if (!entry_0.identifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_identifier); - } - else - { - jobject newElement_0_identifierInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier.Value(), - newElement_0_identifierInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_identifierInsideOptional, newElement_0_identifier); - } - jobject newElement_0_type; - if (!entry_0.type.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_type); - } - else - { - jobject newElement_0_typeInsideOptional; - std::string newElement_0_typeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_typeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_typeInsideOptional = static_cast(entry_0.type.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeInsideOptionalClassName.c_str(), newElement_0_typeInsideOptionalCtorSignature.c_str(), - jninewElement_0_typeInsideOptional, newElement_0_typeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_typeInsideOptional, newElement_0_type); - } - - jclass channelInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); - return; - } - - jmethodID channelInfoStructStructCtor_1; - err = - chip::JniReferences::GetInstance().FindMethod(env, channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &channelInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, - newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, - newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_identifier; - std::string newElement_0_identifierClassName = "java/lang/Integer"; - std::string newElement_0_identifierCtorSignature = "(I)V"; - jint jninewElement_0_identifier = static_cast(entry_0.identifier); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - jninewElement_0_identifier, newElement_0_identifier); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return; - } - - jmethodID targetInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &targetInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::CHIPMediaPlaybackAvailableAudioTracksAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::~CHIPMediaPlaybackAvailableAudioTracksAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::Nullable< - chip::app::DataModel::DecodableList> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - jobject newElement_1_id; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); - jobject newElement_1_trackAttributes; - if (entry_1.trackAttributes.IsNull()) - { - newElement_1_trackAttributes = nullptr; - } - else - { - jobject newElement_1_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.trackAttributes.Value().languageCode, - newElement_1_trackAttributes_languageCode)); - jobject newElement_1_trackAttributes_displayName; - if (!entry_1.trackAttributes.Value().displayName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); - } - else - { - jobject newElement_1_trackAttributes_displayNameInsideOptional; - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) - { - newElement_1_trackAttributes_displayNameInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().displayName.Value().Value(), - newElement_1_trackAttributes_displayNameInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, - newElement_1_trackAttributes_displayName); - } - - jclass trackAttributesStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return; - } - - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return; - } - - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); - } - - jclass trackStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return; - } - - jmethodID trackStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_2, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_2); - if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return; - } - - newElement_1 = - env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackAvailableTextTracksAttributeCallback::CHIPMediaPlaybackAvailableTextTracksAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackAvailableTextTracksAttributeCallback::~CHIPMediaPlaybackAvailableTextTracksAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackAvailableTextTracksAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::Nullable< - chip::app::DataModel::DecodableList> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - jobject newElement_1_id; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); - jobject newElement_1_trackAttributes; - if (entry_1.trackAttributes.IsNull()) - { - newElement_1_trackAttributes = nullptr; - } - else - { - jobject newElement_1_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.trackAttributes.Value().languageCode, - newElement_1_trackAttributes_languageCode)); - jobject newElement_1_trackAttributes_displayName; - if (!entry_1.trackAttributes.Value().displayName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); - } - else - { - jobject newElement_1_trackAttributes_displayNameInsideOptional; - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) - { - newElement_1_trackAttributes_displayNameInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().displayName.Value().Value(), - newElement_1_trackAttributes_displayNameInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, - newElement_1_trackAttributes_displayName); - } - - jclass trackAttributesStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return; - } - - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return; - } - - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); - } - - jclass trackStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return; - } - - jmethodID trackStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_2, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_2); - if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return; - } - - newElement_1 = - env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaInputInputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - jint jninewElement_0_index = static_cast(entry_0.index); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, - newElement_0_index); - jobject newElement_0_inputType; - std::string newElement_0_inputTypeClassName = "java/lang/Integer"; - std::string newElement_0_inputTypeCtorSignature = "(I)V"; - jint jninewElement_0_inputType = static_cast(entry_0.inputType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), - newElement_0_inputTypeCtorSignature.c_str(), - jninewElement_0_inputType, newElement_0_inputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_description; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); - - jclass inputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); - return; - } - - jmethodID inputInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, inputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V", &inputInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || inputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, - newElement_0_inputType, newElement_0_name, newElement_0_description); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeaderAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHeaderAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - jint jninewElement_0_index = static_cast(entry_0.index); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, - newElement_0_index); - jobject newElement_0_outputType; - std::string newElement_0_outputTypeClassName = "java/lang/Integer"; - std::string newElement_0_outputTypeCtorSignature = "(I)V"; - jint jninewElement_0_outputType = static_cast(entry_0.outputType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), - newElement_0_outputTypeCtorSignature.c_str(), - jninewElement_0_outputType, newElement_0_outputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass outputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); - return; - } - - jmethodID outputInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, outputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", - &outputInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || outputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, - newElement_0_outputType, newElement_0_name); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCatalogListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCatalogListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLauncherGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLauncherGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLauncherAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLauncherAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAllowedVendorListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasicGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlOnDemandRatingsAttributeCallback::CHIPContentControlOnDemandRatingsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlOnDemandRatingsAttributeCallback::~CHIPContentControlOnDemandRatingsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlOnDemandRatingsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_ratingName; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); - jobject newElement_0_ratingNameDesc; - if (!entry_0.ratingNameDesc.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); - } - else - { - jobject newElement_0_ratingNameDescInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingNameDesc.Value(), - newElement_0_ratingNameDescInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, - newElement_0_ratingNameDesc); - } - - jclass ratingNameStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); - return; - } - - jmethodID ratingNameStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &ratingNameStructStructCtor_1); - if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); - return; - } - - newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, - newElement_0_ratingNameDesc); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlScheduledContentRatingsAttributeCallback::CHIPContentControlScheduledContentRatingsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlScheduledContentRatingsAttributeCallback::~CHIPContentControlScheduledContentRatingsAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlScheduledContentRatingsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_ratingName; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); - jobject newElement_0_ratingNameDesc; - if (!entry_0.ratingNameDesc.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); - } - else - { - jobject newElement_0_ratingNameDescInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingNameDesc.Value(), - newElement_0_ratingNameDescInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, - newElement_0_ratingNameDesc); - } - - jclass ratingNameStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); - return; - } - - jmethodID ratingNameStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &ratingNameStructStructCtor_1); - if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); - return; - } - - newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, - newElement_0_ratingNameDesc); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlGeneratedCommandListAttributeCallback::CHIPContentControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlGeneratedCommandListAttributeCallback::~CHIPContentControlGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlAcceptedCommandListAttributeCallback::CHIPContentControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlAcceptedCommandListAttributeCallback::~CHIPContentControlAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlEventListAttributeCallback::CHIPContentControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlEventListAttributeCallback::~CHIPContentControlEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentControlAttributeListAttributeCallback::CHIPContentControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentControlAttributeListAttributeCallback::~CHIPContentControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentAppObserverGeneratedCommandListAttributeCallback::CHIPContentAppObserverGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentAppObserverGeneratedCommandListAttributeCallback::~CHIPContentAppObserverGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentAppObserverGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentAppObserverAcceptedCommandListAttributeCallback::CHIPContentAppObserverAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentAppObserverAcceptedCommandListAttributeCallback::~CHIPContentAppObserverAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentAppObserverAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentAppObserverEventListAttributeCallback::CHIPContentAppObserverEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentAppObserverEventListAttributeCallback::~CHIPContentAppObserverEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentAppObserverEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPContentAppObserverAttributeListAttributeCallback::CHIPContentAppObserverAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentAppObserverAttributeListAttributeCallback::~CHIPContentAppObserverAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentAppObserverAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CHIPElectricalMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::~CHIPElectricalMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CHIPElectricalMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::~CHIPElectricalMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalMeasurementEventListAttributeCallback::CHIPElectricalMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementEventListAttributeCallback::~CHIPElectricalMeasurementEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPElectricalMeasurementAttributeListAttributeCallback::CHIPElectricalMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPElectricalMeasurementAttributeListAttributeCallback::~CHIPElectricalMeasurementAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListInt8uAttributeCallback::CHIPUnitTestingListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListInt8uAttributeCallback::~CHIPUnitTestingListInt8uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListInt8uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListOctetStringAttributeCallback::CHIPUnitTestingListOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListOctetStringAttributeCallback::~CHIPUnitTestingListOctetStringAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListOctetStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListStructOctetStringAttributeCallback::CHIPUnitTestingListStructOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListStructOctetStringAttributeCallback::~CHIPUnitTestingListStructOctetStringAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListStructOctetStringAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_member1; - std::string newElement_0_member1ClassName = "java/lang/Long"; - std::string newElement_0_member1CtorSignature = "(J)V"; - jlong jninewElement_0_member1 = static_cast(entry_0.member1); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), - newElement_0_member1CtorSignature.c_str(), - jninewElement_0_member1, newElement_0_member1); - jobject newElement_0_member2; - jbyteArray newElement_0_member2ByteArray = env->NewByteArray(static_cast(entry_0.member2.size())); - env->SetByteArrayRegion(newElement_0_member2ByteArray, 0, static_cast(entry_0.member2.size()), - reinterpret_cast(entry_0.member2.data())); - newElement_0_member2 = newElement_0_member2ByteArray; - - jclass testListStructOctetStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", testListStructOctetStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet"); - return; - } - - jmethodID testListStructOctetStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, testListStructOctetStructClass_1, "", - "(Ljava/lang/Long;[B)V", &testListStructOctetStructCtor_1); - if (err != CHIP_NO_ERROR || testListStructOctetStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor"); - return; - } - - newElement_0 = env->NewObject(testListStructOctetStructClass_1, testListStructOctetStructCtor_1, newElement_0_member1, - newElement_0_member2); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::~CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_nullableInt; - if (entry_0.nullableInt.IsNull()) - { - newElement_0_nullableInt = nullptr; - } - else - { - std::string newElement_0_nullableIntClassName = "java/lang/Integer"; - std::string newElement_0_nullableIntCtorSignature = "(I)V"; - jint jninewElement_0_nullableInt = static_cast(entry_0.nullableInt.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nullableIntClassName.c_str(), - newElement_0_nullableIntCtorSignature.c_str(), - jninewElement_0_nullableInt, newElement_0_nullableInt); - } - jobject newElement_0_optionalInt; - if (!entry_0.optionalInt.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalInt); - } - else - { - jobject newElement_0_optionalIntInsideOptional; - std::string newElement_0_optionalIntInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_optionalIntInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_optionalIntInsideOptional = static_cast(entry_0.optionalInt.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_optionalIntInsideOptionalClassName.c_str(), - newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), - jninewElement_0_optionalIntInsideOptional, - newElement_0_optionalIntInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalIntInsideOptional, newElement_0_optionalInt); - } - jobject newElement_0_nullableOptionalInt; - if (!entry_0.nullableOptionalInt.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalInt); - } - else - { - jobject newElement_0_nullableOptionalIntInsideOptional; - if (entry_0.nullableOptionalInt.Value().IsNull()) - { - newElement_0_nullableOptionalIntInsideOptional = nullptr; - } - else - { - std::string newElement_0_nullableOptionalIntInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_nullableOptionalIntInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_nullableOptionalIntInsideOptional = - static_cast(entry_0.nullableOptionalInt.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalIntInsideOptionalClassName.c_str(), - newElement_0_nullableOptionalIntInsideOptionalCtorSignature.c_str(), - jninewElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalIntInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalIntInsideOptional, - newElement_0_nullableOptionalInt); - } - jobject newElement_0_nullableString; - if (entry_0.nullableString.IsNull()) - { - newElement_0_nullableString = nullptr; - } - else - { - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableString.Value(), newElement_0_nullableString)); - } - jobject newElement_0_optionalString; - if (!entry_0.optionalString.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalString); - } - else - { - jobject newElement_0_optionalStringInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.optionalString.Value(), - newElement_0_optionalStringInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStringInsideOptional, - newElement_0_optionalString); - } - jobject newElement_0_nullableOptionalString; - if (!entry_0.nullableOptionalString.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalString); - } - else - { - jobject newElement_0_nullableOptionalStringInsideOptional; - if (entry_0.nullableOptionalString.Value().IsNull()) - { - newElement_0_nullableOptionalStringInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.nullableOptionalString.Value().Value(), newElement_0_nullableOptionalStringInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStringInsideOptional, - newElement_0_nullableOptionalString); - } - jobject newElement_0_nullableStruct; - if (entry_0.nullableStruct.IsNull()) - { - newElement_0_nullableStruct = nullptr; - } - else - { - jobject newElement_0_nullableStruct_a; - std::string newElement_0_nullableStruct_aClassName = "java/lang/Integer"; - std::string newElement_0_nullableStruct_aCtorSignature = "(I)V"; - jint jninewElement_0_nullableStruct_a = static_cast(entry_0.nullableStruct.Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), - jninewElement_0_nullableStruct_a, newElement_0_nullableStruct_a); - jobject newElement_0_nullableStruct_b; - std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; - std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_nullableStruct_b = static_cast(entry_0.nullableStruct.Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), - jninewElement_0_nullableStruct_b, newElement_0_nullableStruct_b); - jobject newElement_0_nullableStruct_c; - std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; - std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; - jint jninewElement_0_nullableStruct_c = static_cast(entry_0.nullableStruct.Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), - jninewElement_0_nullableStruct_c, newElement_0_nullableStruct_c); - jobject newElement_0_nullableStruct_d; - jbyteArray newElement_0_nullableStruct_dByteArray = - env->NewByteArray(static_cast(entry_0.nullableStruct.Value().d.size())); - env->SetByteArrayRegion(newElement_0_nullableStruct_dByteArray, 0, - static_cast(entry_0.nullableStruct.Value().d.size()), - reinterpret_cast(entry_0.nullableStruct.Value().d.data())); - newElement_0_nullableStruct_d = newElement_0_nullableStruct_dByteArray; - jobject newElement_0_nullableStruct_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableStruct.Value().e, - newElement_0_nullableStruct_e)); - jobject newElement_0_nullableStruct_f; - std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; - std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; - jint jninewElement_0_nullableStruct_f = static_cast(entry_0.nullableStruct.Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), - jninewElement_0_nullableStruct_f, newElement_0_nullableStruct_f); - jobject newElement_0_nullableStruct_g; - std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; - std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; - jfloat jninewElement_0_nullableStruct_g = static_cast(entry_0.nullableStruct.Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), - jninewElement_0_nullableStruct_g, newElement_0_nullableStruct_g); - jobject newElement_0_nullableStruct_h; - std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; - std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; - jdouble jninewElement_0_nullableStruct_h = static_cast(entry_0.nullableStruct.Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), - jninewElement_0_nullableStruct_h, newElement_0_nullableStruct_h); - - jclass simpleStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_3); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0_nullableStruct = env->NewObject( - simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_nullableStruct_a, newElement_0_nullableStruct_b, - newElement_0_nullableStruct_c, newElement_0_nullableStruct_d, newElement_0_nullableStruct_e, - newElement_0_nullableStruct_f, newElement_0_nullableStruct_g, newElement_0_nullableStruct_h); - } - jobject newElement_0_optionalStruct; - if (!entry_0.optionalStruct.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalStruct); - } - else - { - jobject newElement_0_optionalStructInsideOptional; - jobject newElement_0_optionalStructInsideOptional_a; - std::string newElement_0_optionalStructInsideOptional_aClassName = "java/lang/Integer"; - std::string newElement_0_optionalStructInsideOptional_aCtorSignature = "(I)V"; - jint jninewElement_0_optionalStructInsideOptional_a = static_cast(entry_0.optionalStruct.Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_aClassName.c_str(), - newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_a, - newElement_0_optionalStructInsideOptional_a); - jobject newElement_0_optionalStructInsideOptional_b; - std::string newElement_0_optionalStructInsideOptional_bClassName = "java/lang/Boolean"; - std::string newElement_0_optionalStructInsideOptional_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_optionalStructInsideOptional_b = static_cast(entry_0.optionalStruct.Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_bClassName.c_str(), - newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_b, - newElement_0_optionalStructInsideOptional_b); - jobject newElement_0_optionalStructInsideOptional_c; - std::string newElement_0_optionalStructInsideOptional_cClassName = "java/lang/Integer"; - std::string newElement_0_optionalStructInsideOptional_cCtorSignature = "(I)V"; - jint jninewElement_0_optionalStructInsideOptional_c = static_cast(entry_0.optionalStruct.Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_cClassName.c_str(), - newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_c, - newElement_0_optionalStructInsideOptional_c); - jobject newElement_0_optionalStructInsideOptional_d; - jbyteArray newElement_0_optionalStructInsideOptional_dByteArray = - env->NewByteArray(static_cast(entry_0.optionalStruct.Value().d.size())); - env->SetByteArrayRegion(newElement_0_optionalStructInsideOptional_dByteArray, 0, - static_cast(entry_0.optionalStruct.Value().d.size()), - reinterpret_cast(entry_0.optionalStruct.Value().d.data())); - newElement_0_optionalStructInsideOptional_d = newElement_0_optionalStructInsideOptional_dByteArray; - jobject newElement_0_optionalStructInsideOptional_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.optionalStruct.Value().e, - newElement_0_optionalStructInsideOptional_e)); - jobject newElement_0_optionalStructInsideOptional_f; - std::string newElement_0_optionalStructInsideOptional_fClassName = "java/lang/Integer"; - std::string newElement_0_optionalStructInsideOptional_fCtorSignature = "(I)V"; - jint jninewElement_0_optionalStructInsideOptional_f = static_cast(entry_0.optionalStruct.Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_fClassName.c_str(), - newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_f, - newElement_0_optionalStructInsideOptional_f); - jobject newElement_0_optionalStructInsideOptional_g; - std::string newElement_0_optionalStructInsideOptional_gClassName = "java/lang/Float"; - std::string newElement_0_optionalStructInsideOptional_gCtorSignature = "(F)V"; - jfloat jninewElement_0_optionalStructInsideOptional_g = static_cast(entry_0.optionalStruct.Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_gClassName.c_str(), - newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_g, - newElement_0_optionalStructInsideOptional_g); - jobject newElement_0_optionalStructInsideOptional_h; - std::string newElement_0_optionalStructInsideOptional_hClassName = "java/lang/Double"; - std::string newElement_0_optionalStructInsideOptional_hCtorSignature = "(D)V"; - jdouble jninewElement_0_optionalStructInsideOptional_h = static_cast(entry_0.optionalStruct.Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalStructInsideOptional_hClassName.c_str(), - newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_h, - newElement_0_optionalStructInsideOptional_h); - - jclass simpleStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_3); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0_optionalStructInsideOptional = - env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_optionalStructInsideOptional_a, - newElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_c, - newElement_0_optionalStructInsideOptional_d, newElement_0_optionalStructInsideOptional_e, - newElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_g, - newElement_0_optionalStructInsideOptional_h); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStructInsideOptional, - newElement_0_optionalStruct); - } - jobject newElement_0_nullableOptionalStruct; - if (!entry_0.nullableOptionalStruct.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalStruct); - } - else - { - jobject newElement_0_nullableOptionalStructInsideOptional; - if (entry_0.nullableOptionalStruct.Value().IsNull()) - { - newElement_0_nullableOptionalStructInsideOptional = nullptr; - } - else - { - jobject newElement_0_nullableOptionalStructInsideOptional_a; - std::string newElement_0_nullableOptionalStructInsideOptional_aClassName = "java/lang/Integer"; - std::string newElement_0_nullableOptionalStructInsideOptional_aCtorSignature = "(I)V"; - jint jninewElement_0_nullableOptionalStructInsideOptional_a = - static_cast(entry_0.nullableOptionalStruct.Value().Value().a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_aClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_aCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_a, newElement_0_nullableOptionalStructInsideOptional_a); - jobject newElement_0_nullableOptionalStructInsideOptional_b; - std::string newElement_0_nullableOptionalStructInsideOptional_bClassName = "java/lang/Boolean"; - std::string newElement_0_nullableOptionalStructInsideOptional_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_nullableOptionalStructInsideOptional_b = - static_cast(entry_0.nullableOptionalStruct.Value().Value().b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_bClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_bCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_b, newElement_0_nullableOptionalStructInsideOptional_b); - jobject newElement_0_nullableOptionalStructInsideOptional_c; - std::string newElement_0_nullableOptionalStructInsideOptional_cClassName = "java/lang/Integer"; - std::string newElement_0_nullableOptionalStructInsideOptional_cCtorSignature = "(I)V"; - jint jninewElement_0_nullableOptionalStructInsideOptional_c = - static_cast(entry_0.nullableOptionalStruct.Value().Value().c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_cClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_cCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_c, newElement_0_nullableOptionalStructInsideOptional_c); - jobject newElement_0_nullableOptionalStructInsideOptional_d; - jbyteArray newElement_0_nullableOptionalStructInsideOptional_dByteArray = - env->NewByteArray(static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size())); - env->SetByteArrayRegion(newElement_0_nullableOptionalStructInsideOptional_dByteArray, 0, - static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size()), - reinterpret_cast(entry_0.nullableOptionalStruct.Value().Value().d.data())); - newElement_0_nullableOptionalStructInsideOptional_d = newElement_0_nullableOptionalStructInsideOptional_dByteArray; - jobject newElement_0_nullableOptionalStructInsideOptional_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.nullableOptionalStruct.Value().Value().e, newElement_0_nullableOptionalStructInsideOptional_e)); - jobject newElement_0_nullableOptionalStructInsideOptional_f; - std::string newElement_0_nullableOptionalStructInsideOptional_fClassName = "java/lang/Integer"; - std::string newElement_0_nullableOptionalStructInsideOptional_fCtorSignature = "(I)V"; - jint jninewElement_0_nullableOptionalStructInsideOptional_f = - static_cast(entry_0.nullableOptionalStruct.Value().Value().f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_fClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_fCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_f); - jobject newElement_0_nullableOptionalStructInsideOptional_g; - std::string newElement_0_nullableOptionalStructInsideOptional_gClassName = "java/lang/Float"; - std::string newElement_0_nullableOptionalStructInsideOptional_gCtorSignature = "(F)V"; - jfloat jninewElement_0_nullableOptionalStructInsideOptional_g = - static_cast(entry_0.nullableOptionalStruct.Value().Value().g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_gClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_gCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_g, newElement_0_nullableOptionalStructInsideOptional_g); - jobject newElement_0_nullableOptionalStructInsideOptional_h; - std::string newElement_0_nullableOptionalStructInsideOptional_hClassName = "java/lang/Double"; - std::string newElement_0_nullableOptionalStructInsideOptional_hCtorSignature = "(D)V"; - jdouble jninewElement_0_nullableOptionalStructInsideOptional_h = - static_cast(entry_0.nullableOptionalStruct.Value().Value().h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalStructInsideOptional_hClassName.c_str(), - newElement_0_nullableOptionalStructInsideOptional_hCtorSignature.c_str(), - jninewElement_0_nullableOptionalStructInsideOptional_h, newElement_0_nullableOptionalStructInsideOptional_h); - - jclass simpleStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_4, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_4); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0_nullableOptionalStructInsideOptional = env->NewObject( - simpleStructStructClass_4, simpleStructStructCtor_4, newElement_0_nullableOptionalStructInsideOptional_a, - newElement_0_nullableOptionalStructInsideOptional_b, newElement_0_nullableOptionalStructInsideOptional_c, - newElement_0_nullableOptionalStructInsideOptional_d, newElement_0_nullableOptionalStructInsideOptional_e, - newElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_g, - newElement_0_nullableOptionalStructInsideOptional_h); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStructInsideOptional, - newElement_0_nullableOptionalStruct); - } - jobject newElement_0_nullableList; - if (entry_0.nullableList.IsNull()) - { - newElement_0_nullableList = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableList); - - auto iter_newElement_0_nullableList_3 = entry_0.nullableList.Value().begin(); - while (iter_newElement_0_nullableList_3.Next()) - { - auto & entry_3 = iter_newElement_0_nullableList_3.GetValue(); - jobject newElement_3; - std::string newElement_3ClassName = "java/lang/Integer"; - std::string newElement_3CtorSignature = "(I)V"; - jint jninewElement_3 = static_cast(entry_3); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); - chip::JniReferences::GetInstance().AddToList(newElement_0_nullableList, newElement_3); - } - } - jobject newElement_0_optionalList; - if (!entry_0.optionalList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalList); - } - else - { - jobject newElement_0_optionalListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_optionalListInsideOptional); - - auto iter_newElement_0_optionalListInsideOptional_3 = entry_0.optionalList.Value().begin(); - while (iter_newElement_0_optionalListInsideOptional_3.Next()) - { - auto & entry_3 = iter_newElement_0_optionalListInsideOptional_3.GetValue(); - jobject newElement_3; - std::string newElement_3ClassName = "java/lang/Integer"; - std::string newElement_3CtorSignature = "(I)V"; - jint jninewElement_3 = static_cast(entry_3); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); - chip::JniReferences::GetInstance().AddToList(newElement_0_optionalListInsideOptional, newElement_3); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalListInsideOptional, newElement_0_optionalList); - } - jobject newElement_0_nullableOptionalList; - if (!entry_0.nullableOptionalList.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalList); - } - else - { - jobject newElement_0_nullableOptionalListInsideOptional; - if (entry_0.nullableOptionalList.Value().IsNull()) - { - newElement_0_nullableOptionalListInsideOptional = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableOptionalListInsideOptional); - - auto iter_newElement_0_nullableOptionalListInsideOptional_4 = entry_0.nullableOptionalList.Value().Value().begin(); - while (iter_newElement_0_nullableOptionalListInsideOptional_4.Next()) - { - auto & entry_4 = iter_newElement_0_nullableOptionalListInsideOptional_4.GetValue(); - jobject newElement_4; - std::string newElement_4ClassName = "java/lang/Integer"; - std::string newElement_4CtorSignature = "(I)V"; - jint jninewElement_4 = static_cast(entry_4); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), jninewElement_4, newElement_4); - chip::JniReferences::GetInstance().AddToList(newElement_0_nullableOptionalListInsideOptional, newElement_4); - } - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalListInsideOptional, - newElement_0_nullableOptionalList); - } - - jclass nullablesAndOptionalsStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct", - nullablesAndOptionalsStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct"); - return; - } - - jmethodID nullablesAndOptionalsStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, nullablesAndOptionalsStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/" - "Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V", - &nullablesAndOptionalsStructStructCtor_1); - if (err != CHIP_NO_ERROR || nullablesAndOptionalsStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor"); - return; - } - - newElement_0 = env->NewObject(nullablesAndOptionalsStructStructClass_1, nullablesAndOptionalsStructStructCtor_1, - newElement_0_nullableInt, newElement_0_optionalInt, newElement_0_nullableOptionalInt, - newElement_0_nullableString, newElement_0_optionalString, newElement_0_nullableOptionalString, - newElement_0_nullableStruct, newElement_0_optionalStruct, newElement_0_nullableOptionalStruct, - newElement_0_nullableList, newElement_0_optionalList, newElement_0_nullableOptionalList); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListLongOctetStringAttributeCallback::CHIPUnitTestingListLongOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListLongOctetStringAttributeCallback::~CHIPUnitTestingListLongOctetStringAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListLongOctetStringAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingListFabricScopedAttributeCallback::CHIPUnitTestingListFabricScopedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingListFabricScopedAttributeCallback::~CHIPUnitTestingListFabricScopedAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_fabricSensitiveInt8u; - std::string newElement_0_fabricSensitiveInt8uClassName = "java/lang/Integer"; - std::string newElement_0_fabricSensitiveInt8uCtorSignature = "(I)V"; - jint jninewElement_0_fabricSensitiveInt8u = static_cast(entry_0.fabricSensitiveInt8u); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveInt8uClassName.c_str(), newElement_0_fabricSensitiveInt8uCtorSignature.c_str(), - jninewElement_0_fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); - jobject newElement_0_optionalFabricSensitiveInt8u; - if (!entry_0.optionalFabricSensitiveInt8u.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalFabricSensitiveInt8u); - } - else - { - jobject newElement_0_optionalFabricSensitiveInt8uInsideOptional; - std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_optionalFabricSensitiveInt8uInsideOptional = - static_cast(entry_0.optionalFabricSensitiveInt8u.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), - newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - jninewElement_0_optionalFabricSensitiveInt8uInsideOptional, - newElement_0_optionalFabricSensitiveInt8uInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalFabricSensitiveInt8uInsideOptional, - newElement_0_optionalFabricSensitiveInt8u); - } - jobject newElement_0_nullableFabricSensitiveInt8u; - if (entry_0.nullableFabricSensitiveInt8u.IsNull()) - { - newElement_0_nullableFabricSensitiveInt8u = nullptr; - } - else - { - std::string newElement_0_nullableFabricSensitiveInt8uClassName = "java/lang/Integer"; - std::string newElement_0_nullableFabricSensitiveInt8uCtorSignature = "(I)V"; - jint jninewElement_0_nullableFabricSensitiveInt8u = static_cast(entry_0.nullableFabricSensitiveInt8u.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableFabricSensitiveInt8uClassName.c_str(), - newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), jninewElement_0_nullableFabricSensitiveInt8u, - newElement_0_nullableFabricSensitiveInt8u); - } - jobject newElement_0_nullableOptionalFabricSensitiveInt8u; - if (!entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalFabricSensitiveInt8u); - } - else - { - jobject newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional; - if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) - { - newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = nullptr; - } - else - { - std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = - static_cast(entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), - newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, - newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, - newElement_0_nullableOptionalFabricSensitiveInt8u); - } - jobject newElement_0_fabricSensitiveCharString; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveCharString, - newElement_0_fabricSensitiveCharString)); - jobject newElement_0_fabricSensitiveStruct; - jobject newElement_0_fabricSensitiveStruct_a; - std::string newElement_0_fabricSensitiveStruct_aClassName = "java/lang/Integer"; - std::string newElement_0_fabricSensitiveStruct_aCtorSignature = "(I)V"; - jint jninewElement_0_fabricSensitiveStruct_a = static_cast(entry_0.fabricSensitiveStruct.a); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_aClassName.c_str(), newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_a, newElement_0_fabricSensitiveStruct_a); - jobject newElement_0_fabricSensitiveStruct_b; - std::string newElement_0_fabricSensitiveStruct_bClassName = "java/lang/Boolean"; - std::string newElement_0_fabricSensitiveStruct_bCtorSignature = "(Z)V"; - jboolean jninewElement_0_fabricSensitiveStruct_b = static_cast(entry_0.fabricSensitiveStruct.b); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_bClassName.c_str(), newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_b); - jobject newElement_0_fabricSensitiveStruct_c; - std::string newElement_0_fabricSensitiveStruct_cClassName = "java/lang/Integer"; - std::string newElement_0_fabricSensitiveStruct_cCtorSignature = "(I)V"; - jint jninewElement_0_fabricSensitiveStruct_c = static_cast(entry_0.fabricSensitiveStruct.c); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_cClassName.c_str(), newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_c, newElement_0_fabricSensitiveStruct_c); - jobject newElement_0_fabricSensitiveStruct_d; - jbyteArray newElement_0_fabricSensitiveStruct_dByteArray = - env->NewByteArray(static_cast(entry_0.fabricSensitiveStruct.d.size())); - env->SetByteArrayRegion(newElement_0_fabricSensitiveStruct_dByteArray, 0, - static_cast(entry_0.fabricSensitiveStruct.d.size()), - reinterpret_cast(entry_0.fabricSensitiveStruct.d.data())); - newElement_0_fabricSensitiveStruct_d = newElement_0_fabricSensitiveStruct_dByteArray; - jobject newElement_0_fabricSensitiveStruct_e; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveStruct.e, - newElement_0_fabricSensitiveStruct_e)); - jobject newElement_0_fabricSensitiveStruct_f; - std::string newElement_0_fabricSensitiveStruct_fClassName = "java/lang/Integer"; - std::string newElement_0_fabricSensitiveStruct_fCtorSignature = "(I)V"; - jint jninewElement_0_fabricSensitiveStruct_f = static_cast(entry_0.fabricSensitiveStruct.f.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_fClassName.c_str(), newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_f); - jobject newElement_0_fabricSensitiveStruct_g; - std::string newElement_0_fabricSensitiveStruct_gClassName = "java/lang/Float"; - std::string newElement_0_fabricSensitiveStruct_gCtorSignature = "(F)V"; - jfloat jninewElement_0_fabricSensitiveStruct_g = static_cast(entry_0.fabricSensitiveStruct.g); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_gClassName.c_str(), newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_g, newElement_0_fabricSensitiveStruct_g); - jobject newElement_0_fabricSensitiveStruct_h; - std::string newElement_0_fabricSensitiveStruct_hClassName = "java/lang/Double"; - std::string newElement_0_fabricSensitiveStruct_hCtorSignature = "(D)V"; - jdouble jninewElement_0_fabricSensitiveStruct_h = static_cast(entry_0.fabricSensitiveStruct.h); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fabricSensitiveStruct_hClassName.c_str(), newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), - jninewElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_h); - - jclass simpleStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return; - } - - jmethodID simpleStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, simpleStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/" - "lang/String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V", - &simpleStructStructCtor_2); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return; - } - - newElement_0_fabricSensitiveStruct = env->NewObject( - simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_fabricSensitiveStruct_a, - newElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_c, newElement_0_fabricSensitiveStruct_d, - newElement_0_fabricSensitiveStruct_e, newElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_g, - newElement_0_fabricSensitiveStruct_h); - jobject newElement_0_fabricSensitiveInt8uList; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_fabricSensitiveInt8uList); - - auto iter_newElement_0_fabricSensitiveInt8uList_2 = entry_0.fabricSensitiveInt8uList.begin(); - while (iter_newElement_0_fabricSensitiveInt8uList_2.Next()) - { - auto & entry_2 = iter_newElement_0_fabricSensitiveInt8uList_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_fabricSensitiveInt8uList, newElement_2); - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass testFabricScopedStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped"); - return; - } - - jmethodID testFabricScopedStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, testFabricScopedStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/" - "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &testFabricScopedStructCtor_1); - if (err != CHIP_NO_ERROR || testFabricScopedStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor"); - return; - } - - newElement_0 = - env->NewObject(testFabricScopedStructClass_1, testFabricScopedStructCtor_1, newElement_0_fabricSensitiveInt8u, - newElement_0_optionalFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u, - newElement_0_nullableOptionalFabricSensitiveInt8u, newElement_0_fabricSensitiveCharString, - newElement_0_fabricSensitiveStruct, newElement_0_fabricSensitiveInt8uList, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingNullableBooleanAttributeCallback::CHIPUnitTestingNullableBooleanAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableBooleanAttributeCallback::~CHIPUnitTestingNullableBooleanAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableBooleanAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - jboolean jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableBitmap8AttributeCallback::CHIPUnitTestingNullableBitmap8AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableBitmap8AttributeCallback::~CHIPUnitTestingNullableBitmap8AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableBitmap8AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableBitmap16AttributeCallback::CHIPUnitTestingNullableBitmap16AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableBitmap16AttributeCallback::~CHIPUnitTestingNullableBitmap16AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableBitmap16AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableBitmap32AttributeCallback::CHIPUnitTestingNullableBitmap32AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableBitmap32AttributeCallback::~CHIPUnitTestingNullableBitmap32AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableBitmap32AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableBitmap64AttributeCallback::CHIPUnitTestingNullableBitmap64AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableBitmap64AttributeCallback::~CHIPUnitTestingNullableBitmap64AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableBitmap64AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value().Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt8uAttributeCallback::CHIPUnitTestingNullableInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt8uAttributeCallback::~CHIPUnitTestingNullableInt8uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt8uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt16uAttributeCallback::CHIPUnitTestingNullableInt16uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt16uAttributeCallback::~CHIPUnitTestingNullableInt16uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt16uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt24uAttributeCallback::CHIPUnitTestingNullableInt24uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt24uAttributeCallback::~CHIPUnitTestingNullableInt24uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt24uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt32uAttributeCallback::CHIPUnitTestingNullableInt32uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt32uAttributeCallback::~CHIPUnitTestingNullableInt32uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt32uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt40uAttributeCallback::CHIPUnitTestingNullableInt40uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt40uAttributeCallback::~CHIPUnitTestingNullableInt40uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt40uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt48uAttributeCallback::CHIPUnitTestingNullableInt48uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt48uAttributeCallback::~CHIPUnitTestingNullableInt48uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt48uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt56uAttributeCallback::CHIPUnitTestingNullableInt56uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt56uAttributeCallback::~CHIPUnitTestingNullableInt56uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt56uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt64uAttributeCallback::CHIPUnitTestingNullableInt64uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt64uAttributeCallback::~CHIPUnitTestingNullableInt64uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt64uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt8sAttributeCallback::CHIPUnitTestingNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt8sAttributeCallback::~CHIPUnitTestingNullableInt8sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt8sAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt16sAttributeCallback::CHIPUnitTestingNullableInt16sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt16sAttributeCallback::~CHIPUnitTestingNullableInt16sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt16sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt24sAttributeCallback::CHIPUnitTestingNullableInt24sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt24sAttributeCallback::~CHIPUnitTestingNullableInt24sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt24sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt32sAttributeCallback::CHIPUnitTestingNullableInt32sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt32sAttributeCallback::~CHIPUnitTestingNullableInt32sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt32sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt40sAttributeCallback::CHIPUnitTestingNullableInt40sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt40sAttributeCallback::~CHIPUnitTestingNullableInt40sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt40sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt48sAttributeCallback::CHIPUnitTestingNullableInt48sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt48sAttributeCallback::~CHIPUnitTestingNullableInt48sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt48sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt56sAttributeCallback::CHIPUnitTestingNullableInt56sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt56sAttributeCallback::~CHIPUnitTestingNullableInt56sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt56sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableInt64sAttributeCallback::CHIPUnitTestingNullableInt64sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableInt64sAttributeCallback::~CHIPUnitTestingNullableInt64sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableInt64sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableEnum8AttributeCallback::CHIPUnitTestingNullableEnum8AttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableEnum8AttributeCallback::~CHIPUnitTestingNullableEnum8AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableEnum8AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableEnum16AttributeCallback::CHIPUnitTestingNullableEnum16AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableEnum16AttributeCallback::~CHIPUnitTestingNullableEnum16AttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableEnum16AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableFloatSingleAttributeCallback::CHIPUnitTestingNullableFloatSingleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableFloatSingleAttributeCallback::~CHIPUnitTestingNullableFloatSingleAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableFloatSingleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableFloatDoubleAttributeCallback::CHIPUnitTestingNullableFloatDoubleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableFloatDoubleAttributeCallback::~CHIPUnitTestingNullableFloatDoubleAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableFloatDoubleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Double;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Double"; - std::string javaValueCtorSignature = "(D)V"; - jdouble jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableOctetStringAttributeCallback::CHIPUnitTestingNullableOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableOctetStringAttributeCallback::~CHIPUnitTestingNullableOctetStringAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableOctetStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableCharStringAttributeCallback::CHIPUnitTestingNullableCharStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableCharStringAttributeCallback::~CHIPUnitTestingNullableCharStringAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableCharStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableEnumAttrAttributeCallback::CHIPUnitTestingNullableEnumAttrAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableEnumAttrAttributeCallback::~CHIPUnitTestingNullableEnumAttrAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableEnumAttrAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::~CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPUnitTestingGeneratedCommandListAttributeCallback::CHIPUnitTestingGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingGeneratedCommandListAttributeCallback::~CHIPUnitTestingGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingAcceptedCommandListAttributeCallback::CHIPUnitTestingAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingAcceptedCommandListAttributeCallback::~CHIPUnitTestingAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingEventListAttributeCallback::CHIPUnitTestingEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingEventListAttributeCallback::~CHIPUnitTestingEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUnitTestingAttributeListAttributeCallback::CHIPUnitTestingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPUnitTestingAttributeListAttributeCallback::~CHIPUnitTestingAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPUnitTestingAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFaultInjectionGeneratedCommandListAttributeCallback::CHIPFaultInjectionGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFaultInjectionGeneratedCommandListAttributeCallback::~CHIPFaultInjectionGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFaultInjectionGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFaultInjectionAcceptedCommandListAttributeCallback::CHIPFaultInjectionAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFaultInjectionAcceptedCommandListAttributeCallback::~CHIPFaultInjectionAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFaultInjectionAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFaultInjectionEventListAttributeCallback::CHIPFaultInjectionEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFaultInjectionEventListAttributeCallback::~CHIPFaultInjectionEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFaultInjectionEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFaultInjectionAttributeListAttributeCallback::CHIPFaultInjectionAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFaultInjectionAttributeListAttributeCallback::~CHIPFaultInjectionAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFaultInjectionAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSampleMeiGeneratedCommandListAttributeCallback::CHIPSampleMeiGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSampleMeiGeneratedCommandListAttributeCallback::~CHIPSampleMeiGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSampleMeiGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSampleMeiAcceptedCommandListAttributeCallback::CHIPSampleMeiAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSampleMeiAcceptedCommandListAttributeCallback::~CHIPSampleMeiAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSampleMeiAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSampleMeiEventListAttributeCallback::CHIPSampleMeiEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSampleMeiEventListAttributeCallback::~CHIPSampleMeiEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSampleMeiEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPSampleMeiAttributeListAttributeCallback::CHIPSampleMeiAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPSampleMeiAttributeListAttributeCallback::~CHIPSampleMeiAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPSampleMeiAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} From c378279eb138aae8a615e01e0ca2b9d0ab4f77cc Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 25 Jan 2024 13:06:45 -0500 Subject: [PATCH 35/45] Add protocol decoding information for latest spec updates (#31687) * Add more protocol decoding information * Add InvokeResponse::more_chunked_messages * Update SessionParameter struct and include max-paths-per-invoke --- src/lib/format/protocol_messages.matter | 66 +++++++++++++++++++++---- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/src/lib/format/protocol_messages.matter b/src/lib/format/protocol_messages.matter index e13440867b8c41..c669d22daf00d2 100644 --- a/src/lib/format/protocol_messages.matter +++ b/src/lib/format/protocol_messages.matter @@ -24,17 +24,23 @@ /// client cluster SecureChannelProtocol = 0xFFFF0000 { - struct ICDParameterStruct { - int32u sleepy_idle_interval = 1; - int32u sleepy_active_interval = 2; + struct SessionParameterStruct { + optional int32u session_idle_interval = 1; + optional int32u session_active_interval = 2; + optional int16u session_active_threshold = 3; + int16u data_model_revision = 4; + int16u interaction_model_revision = 5; + int32u specification_version = 6; + int16u max_paths_per_invoke = 7; } + struct PBKDFParamRequest { octet_string<32> initiator_random = 1; int16u initiator_session_id = 2; int16u passcode_id = 3; boolean has_pbkdf_parameters = 4; - optional ICDParameterStruct initiator_icd_params = 5; + optional SessionParameterStruct initiator_session_params = 5; } struct CryptoPBKDFParameterSet { @@ -47,7 +53,7 @@ client cluster SecureChannelProtocol = 0xFFFF0000 { octet_string<32> responder_random = 2; int16u responder_session_id = 3; CryptoPBKDFParameterSet pbkdf_parameters = 4; - optional IDCParameterStruct responder_icd_params = 5; + optional SessionParameterStruct responder_icd_params = 5; } struct PasePake1 { @@ -68,7 +74,7 @@ client cluster SecureChannelProtocol = 0xFFFF0000 { int16u initiator_session_id = 2; octet_string<32> destination_id = 3; octet_string<65> initiator_eph_pub_key = 4; - optional ICDParameterStruct initiator_icd_params = 5; + optional SessionParameterStruct initiator_session_params = 5; optional octet_string<16> resumption_id = 6; optional octet_string initiator_resume_mic = 7; } @@ -78,7 +84,7 @@ client cluster SecureChannelProtocol = 0xFFFF0000 { int16u responder_sessoion_id = 2; octet_string<65> responder_eph_pub_key = 3; octet_string encrypted2 = 4; - optional ICDParameterStruct responder_icd_params = 5; + optional SessionParameterStruct responder_session_params = 5; } struct CaseSigma3 { @@ -89,7 +95,7 @@ client cluster SecureChannelProtocol = 0xFFFF0000 { octet_string<16> resumption_id = 1; octet_string<16> sigma2_resume_mic = 2; int16u responder_sessoion_id = 3; - optional ICDParameterStruct responder_icd_params = 4; + optional SessionParameterStruct responder_session_params = 4; } // IDs here are based on Protocol opcodes @@ -166,6 +172,7 @@ client cluster IMProtocol = 0xFFFF0001 { optional EventFilterIB event_filters[] = 2; optional boolean fabric_filtered = 3; optional DataVersionFilterIB data_version_filters[] = 4; + optional boolean include_attribution_data = 5; // 10.2.2.2. Context Tag Encoded Action Information int8u interaction_model_revison = 0xFF; @@ -237,6 +244,24 @@ client cluster IMProtocol = 0xFFFF0001 { StatusIB status = 1; } + struct AttributionData { + // NOTE: 0 is missing + int8u context_information = 1; + int32u source_context = 2; + + // at-most-one-of { + optional int64u node_id = 3; + optional int16u group_id = 4; + // } + + // at-most-one-of { + optional int64u epoch_timestamp = 5; + optional int64u system_timestamp = 6; + // } + + int8u fabric_index = 0xFE; + } + struct AttributeData { optional int32u data_version = 0; AttributePathIB path = 1; @@ -266,6 +291,8 @@ client cluster IMProtocol = 0xFFFF0001 { // } cluster_event_payload data = 7; + + AttributionData attribution_data = 8; } struct EventReportIB { @@ -288,6 +315,7 @@ client cluster IMProtocol = 0xFFFF0001 { int32u data_version = 0; AttributePathIB path = 1; cluster_attribute_payload data = 2; + AttributionData attribution_data = 3; } struct WriteRequestMessage { @@ -320,7 +348,26 @@ client cluster IMProtocol = 0xFFFF0001 { struct CommandDataIB { CommandPathIB path = 0; - cluster_command_payload data = 1; + optional cluster_command_payload data = 1; + optional int16u command_ref = 2; + + // at-most-one-of { + optional SuppliedAttribution supplied_attribution_data = 3; + optional int16u supplied_attribution_data_repeat = 4; + // } + } + + enum SuppliedAttributionContextInformation : enum8 { + kDefaultClientAction = 0; + kUserInteraction = 1; + kClientAutomationRule = 2; + kClientSchedule = 3; + kClientTimer = 4; + } + + struct SuppliedAttribution { + SuppliedAttributeContextInformation context_information = 0; + int32u source_context = 1; } struct InvokeRequestMessage { @@ -345,6 +392,7 @@ client cluster IMProtocol = 0xFFFF0001 { struct InvokeResponseMessage { boolean suppress_response = 0; InvokeResponseIB invoke_responses[] = 1; + optional boolean more_chunked_messages = 2; // 10.2.2.2. Context Tag Encoded Action Information int8u interaction_model_revison = 0xFF; From b8db5ee7ea2b43c1ebe77ac776d1ca41ea0c481e Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:05:17 -0500 Subject: [PATCH 36/45] Refactor app/Build.gn to enable depending on individual components (#31632) * Refactor Build.gn to enable the interaction model beeing a dependency of the ICDManager * move public deps * refactor src app to remove uncessary sources * merge controller-dynamic back into interaction model * add include dep * remove concrete path include * fix build issues * restyle * clean up build.gn * address review comments * add missing dep * Restyled by gn --------- Co-authored-by: Restyled.io --- src/app/BUILD.gn | 210 ++++++++++++------ src/app/icd/BUILD.gn | 1 + src/test_driver/efr32/.gn | 2 + .../efr32/include/CHIPProjectConfig.h | 3 + 4 files changed, 149 insertions(+), 67 deletions(-) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 74d01091b8d791..d2c97e188192ed 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -63,6 +63,12 @@ buildconfig_header("app_buildconfig") { visibility = [ ":app_config" ] } +source_set("app_config") { + sources = [ "AppConfig.h" ] + + deps = [ ":app_buildconfig" ] +} + source_set("revision_info") { sources = [ "DataModelRevision.h", @@ -71,45 +77,45 @@ source_set("revision_info") { ] } -source_set("app_config") { - sources = [ "AppConfig.h" ] +source_set("paths") { + sources = [ + "AttributePathParams.h", + "ConcreteClusterPath.h", + "ConcreteEventPath.h", + "DataVersionFilter.h", + "EventPathParams.h", + ] - deps = [ ":app_buildconfig" ] + # This source sets also depends on basic-types.h that is not in any dependency we can use + public_deps = [ + ":app_config", + "${chip_root}/src/lib/core", + ] } -static_library("app") { - output_name = "libCHIPDataModel" +source_set("global-attributes") { + sources = [ "GlobalAttributes.h" ] + + # This also depends on zap-generated code which is currently impossible to split outs + public_deps = [ "${chip_root}/src/lib/support" ] +} +source_set("pre-encoded-value") { + sources = [ + "data-model/FabricScopedPreEncodedValue.cpp", + "data-model/FabricScopedPreEncodedValue.h", + "data-model/PreEncodedValue.cpp", + "data-model/PreEncodedValue.h", + ] + + deps = [ + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + +source_set("message-def") { sources = [ - "AttributeAccessInterface.cpp", - "AttributePathExpandIterator.cpp", - "AttributePathExpandIterator.h", - "AttributePathParams.h", - "AttributePersistenceProvider.h", - "CASEClient.cpp", - "CASEClient.h", - "CASEClientPool.h", - "CASESessionManager.cpp", - "CASESessionManager.h", - "ChunkedWriteCallback.cpp", - "ChunkedWriteCallback.h", - "CommandHandler.cpp", - "CommandResponseHelper.h", - "CommandResponseSender.cpp", - "CommandSender.cpp", - "DefaultAttributePersistenceProvider.cpp", - "DefaultAttributePersistenceProvider.h", - "DeferredAttributePersistenceProvider.cpp", - "DeferredAttributePersistenceProvider.h", - "DeviceProxy.cpp", - "DeviceProxy.h", - "EventManagement.cpp", - "EventPathParams.h", - "FailSafeContext.cpp", - "FailSafeContext.h", - "GlobalAttributes.h", - "InteractionModelEngine.cpp", - "InteractionModelTimeout.h", "MessageDef/ArrayBuilder.cpp", "MessageDef/ArrayParser.cpp", "MessageDef/AttributeDataIB.cpp", @@ -182,29 +188,51 @@ static_library("app") { "MessageDef/TimedRequestMessage.cpp", "MessageDef/WriteRequestMessage.cpp", "MessageDef/WriteResponseMessage.cpp", - "OTAUserConsentCommon.h", + ] + + deps = [ + ":app_config", + ":paths", + ":revision_info", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + "${chip_root}/src/protocols/interaction_model", + "${chip_root}/src/protocols/secure_channel", + ] +} + +config("config-controller-dynamic-server") { + defines = [ + "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", + "CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=1", + ] +} + +# interaction-model is a static-library because it currently requires global functions (app/util/...) that are stubbed in different test files that depend on the app static_library +# which in tern depens on the interaction-model. +# Using source_set prevents the unit test to build correctly. +static_library("interaction-model") { + sources = [ + "CASEClient.cpp", + "CASEClient.h", + "CASEClientPool.h", + "CASESessionManager.cpp", + "CASESessionManager.h", + "DeviceProxy.cpp", + "DeviceProxy.h", + "InteractionModelEngine.cpp", + "InteractionModelEngine.h", + "InteractionModelTimeout.h", "OperationalSessionSetup.cpp", "OperationalSessionSetup.h", "OperationalSessionSetupPool.h", - "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", - "SafeAttributePersistenceProvider.h", "StatusResponse.cpp", "StatusResponse.h", "SubscriptionResumptionStorage.h", "TimedHandler.cpp", "TimedHandler.h", - "TimedRequest.cpp", - "TimedRequest.h", - "TimerDelegates.cpp", - "TimerDelegates.h", - "WriteClient.cpp", - "WriteHandler.cpp", - "data-model/FabricScopedPreEncodedValue.cpp", - "data-model/FabricScopedPreEncodedValue.h", - "data-model/PreEncodedValue.cpp", - "data-model/PreEncodedValue.h", "reporting/Engine.cpp", "reporting/Engine.h", "reporting/ReportScheduler.h", @@ -215,18 +243,31 @@ static_library("app") { "reporting/reporting.h", ] + public_deps = [ + ":app_config", + ":message-def", + ":paths", + "${chip_root}/src/app/icd:icd_config", + "${chip_root}/src/app/icd:observer", + "${chip_root}/src/lib/address_resolve", + "${chip_root}/src/lib/support", + "${chip_root}/src/protocols/interaction_model", + "${chip_root}/src/protocols/secure_channel", + "${chip_root}/src/system", + ] + + public_configs = [ "${chip_root}/src:includes" ] + if (chip_persist_subscriptions) { sources += [ "SimpleSubscriptionResumptionStorage.cpp", "SimpleSubscriptionResumptionStorage.h", + "SubscriptionResumptionSessionEstablisher.cpp", + "SubscriptionResumptionSessionEstablisher.h", ] } if (chip_build_controller_dynamic_server) { - defines = [ - "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", - "CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=1", - ] sources += [ "clusters/ota-provider/ota-provider.cpp", "dynamic_server/AccessControl.cpp", @@ -235,39 +276,74 @@ static_library("app") { "util/privilege-storage.cpp", "util/privilege-storage.h", ] - } - if (chip_persist_subscriptions) { - sources += [ - "SubscriptionResumptionSessionEstablisher.cpp", - "SubscriptionResumptionSessionEstablisher.h", + public_deps += [ + ":global-attributes", + "${chip_root}/src/access", ] - } - if (chip_enable_read_client) { - sources += [ - "BufferedReadCallback.cpp", - "ClusterStateCache.cpp", - "ClusterStateCache.h", - "ReadClient.cpp", - ] + public_configs += [ ":config-controller-dynamic-server" ] } +} + +# Note to developpers, instead of continuously adding files in the app librabry, it is recommand to create smaller source_sets that app can depend on. +# This way, we can have a better understanding of dependencies and other componenets can depend on the different source_sets without needing to depend on the entire app library. +static_library("app") { + output_name = "libCHIPDataModel" + + sources = [ + "AttributeAccessInterface.cpp", + "AttributePathExpandIterator.cpp", + "AttributePathExpandIterator.h", + "AttributePersistenceProvider.h", + "ChunkedWriteCallback.cpp", + "ChunkedWriteCallback.h", + "CommandHandler.cpp", + "CommandResponseHelper.h", + "CommandResponseSender.cpp", + "CommandSender.cpp", + "DefaultAttributePersistenceProvider.cpp", + "DefaultAttributePersistenceProvider.h", + "DeferredAttributePersistenceProvider.cpp", + "DeferredAttributePersistenceProvider.h", + "EventManagement.cpp", + "FailSafeContext.cpp", + "FailSafeContext.h", + "OTAUserConsentCommon.h", + "ReadHandler.cpp", + "SafeAttributePersistenceProvider.h", + "TimedRequest.cpp", + "TimedRequest.h", + "TimerDelegates.cpp", + "TimerDelegates.h", + "WriteClient.cpp", + "WriteHandler.cpp", + ] public_deps = [ ":app_config", + ":global-attributes", + ":interaction-model", + ":pre-encoded-value", ":revision_info", - "${chip_root}/src/access", "${chip_root}/src/app/icd:icd_config", - "${chip_root}/src/app/icd:observer", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", "${chip_root}/src/protocols/interaction_model", - "${chip_root}/src/protocols/secure_channel", "${chip_root}/src/system", "${nlio_root}:nlio", ] + if (chip_enable_read_client) { + sources += [ + "BufferedReadCallback.cpp", + "ClusterStateCache.cpp", + "ClusterStateCache.h", + "ReadClient.cpp", + ] + } + if (chip_enable_icd_server) { public_deps += [ "${chip_root}/src/app/icd:manager", diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index a0aae22c3d9a6a..ba72052fffbffa 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -70,6 +70,7 @@ source_set("manager") { ":notifier", ":observer", ":sender", + "${chip_root}/src/app:interaction-model", "${chip_root}/src/credentials:credentials", ] } diff --git a/src/test_driver/efr32/.gn b/src/test_driver/efr32/.gn index 9082b04c220ef7..c6b6cbe12ba178 100644 --- a/src/test_driver/efr32/.gn +++ b/src/test_driver/efr32/.gn @@ -30,4 +30,6 @@ default_args = { [ "//third_party/connectedhomeip/scripts/setup/requirements.build.txt" ] import("//args.gni") + + optimize_debug_level = "s" } diff --git a/src/test_driver/efr32/include/CHIPProjectConfig.h b/src/test_driver/efr32/include/CHIPProjectConfig.h index 1ab7ef5879b3f5..2122abeb430cb7 100644 --- a/src/test_driver/efr32/include/CHIPProjectConfig.h +++ b/src/test_driver/efr32/include/CHIPProjectConfig.h @@ -123,3 +123,6 @@ * 30000 (30 secondes). */ #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000) + +// Enable unit-test only features +#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 From 2ef091e8d91a97bf1d6fb7e3995c882bd4b3fe0f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 25 Jan 2024 16:21:08 -0500 Subject: [PATCH 37/45] Update Darwin availability annotations. (#31685) Make sure we don't expose new UnitTesting stuff in the public API. --- .../Framework/CHIP/templates/availability.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 4850889f6ce132..526df9ba2f07c8 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8579,6 +8579,10 @@ - SetpointHoldExpiryTimestamp - QueuedPreset - ActiveScheduleHandle + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - MeiInt8u commands: DoorLock: # Aliro is not ready yet. @@ -8596,6 +8600,11 @@ RVCOperationalState: # Targeting Spring 2024 Matter release - GoHome + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - TestDifferentVendorMeiRequest + - TestDifferentVendorMeiResponse structs: Thermostat: # Targeting Spring 2024 Matter release @@ -8605,6 +8614,11 @@ - PresetTypeStruct - ScheduleTypeStruct - QueuedPresetStruct + events: + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - TestDifferentVendorMeiEvent enums: Thermostat: # Targeting Spring 2024 Matter release From ce800c26dce04cfe080f05d1119e91290277699b Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Thu, 25 Jan 2024 23:33:33 +0000 Subject: [PATCH 38/45] Fixes #31578 Removed provisional features from implementation to align with test plan for TE2. (#31663) --- .../all-clusters-common/src/device-energy-management-stub.cpp | 3 +-- examples/energy-management-app/esp32/main/main.cpp | 3 +-- examples/energy-management-app/linux/main.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp index 190702c61af464..ddbfe17e639d60 100644 --- a/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp @@ -52,8 +52,7 @@ void emberAfDeviceEnergyManagementClusterInitCallback(chip::EndpointId endpointI BitMask( DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, - DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, - DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); + DeviceEnergyManagement::Feature::kPausable)); if (!gInstance) { diff --git a/examples/energy-management-app/esp32/main/main.cpp b/examples/energy-management-app/esp32/main/main.cpp index fd79e606afb6aa..2e7e43f730a025 100644 --- a/examples/energy-management-app/esp32/main/main.cpp +++ b/examples/energy-management-app/esp32/main/main.cpp @@ -154,8 +154,7 @@ CHIP_ERROR DeviceEnergyManagementInit() BitMask( DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, - DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, - DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); + DeviceEnergyManagement::Feature::kPausable)); if (!gDEMInstance) { diff --git a/examples/energy-management-app/linux/main.cpp b/examples/energy-management-app/linux/main.cpp index 61fdec251b7d6d..824fa17316cc70 100644 --- a/examples/energy-management-app/linux/main.cpp +++ b/examples/energy-management-app/linux/main.cpp @@ -77,8 +77,7 @@ CHIP_ERROR DeviceEnergyManagementInit() BitMask( DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, - DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, - DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); + DeviceEnergyManagement::Feature::kPausable)); if (!gDEMInstance) { From 1582d8c1cde50d7ca7cdc2c148ea53ce145bc2cf Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 26 Jan 2024 00:35:52 +0100 Subject: [PATCH 39/45] [Tizen] Display human readable error messages instead of numbers (#31552) * Common utility for Tizen to Matter error conversion * Use TizenToChipError in preference module * Show human readable error message in BLE module * Use TizenToChipError in BLE module * Get rid of unnecessary data copying * Use strerror when getting error from POSIX calls * Make sure INET socket is closed upon returning error * Clear iwreq before making ioctl call * Convert ConnectivityUtils class to namespace * Remove not used connectivity utils * Show errno message in DiagnosticDataProviderImpl * Use human readable error message in DnssdImpl * Do not pre-initialize buffer for storing log message * Use TizenToChipError in SystemInfo * Mark more helper functions as constexpr * Cleanup * Use CHIP_ERROR_POSIX for returning errors from POSIX API --- src/platform/Tizen/AppPreference.cpp | 38 +- src/platform/Tizen/BLEManagerImpl.cpp | 276 ++++---- src/platform/Tizen/BLEManagerImpl.h | 6 +- src/platform/Tizen/BUILD.gn | 2 + src/platform/Tizen/ChipDeviceScanner.cpp | 22 +- src/platform/Tizen/ChipDeviceScanner.h | 11 +- src/platform/Tizen/ConnectivityUtils.cpp | 595 +++++++----------- src/platform/Tizen/ConnectivityUtils.h | 41 +- .../Tizen/DiagnosticDataProviderImpl.cpp | 32 +- src/platform/Tizen/DnssdImpl.cpp | 120 ++-- src/platform/Tizen/ErrorUtils.cpp | 50 ++ src/platform/Tizen/ErrorUtils.h | 30 + src/platform/Tizen/Logging.cpp | 7 +- src/platform/Tizen/SystemInfo.cpp | 6 +- src/platform/Tizen/WiFiManager.cpp | 18 +- 15 files changed, 610 insertions(+), 644 deletions(-) create mode 100644 src/platform/Tizen/ErrorUtils.cpp create mode 100644 src/platform/Tizen/ErrorUtils.h diff --git a/src/platform/Tizen/AppPreference.cpp b/src/platform/Tizen/AppPreference.cpp index ffb36ee6777186..bf9733dd7eb22d 100644 --- a/src/platform/Tizen/AppPreference.cpp +++ b/src/platform/Tizen/AppPreference.cpp @@ -33,6 +33,10 @@ #include #include +#include "ErrorUtils.h" + +using chip::DeviceLayer::Internal::TizenToChipError; + namespace chip { namespace DeviceLayer { namespace PersistedStorage { @@ -56,18 +60,11 @@ CHIP_ERROR GetData(const char * key, void * data, size_t dataSize, size_t * getD std::unique_ptr _{ encodedData, &::free }; int err = preference_get_string(key, &encodedData); - if (err == PREFERENCE_ERROR_NO_KEY) - { - return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - } - if (err == PREFERENCE_ERROR_OUT_OF_MEMORY) - { - return CHIP_ERROR_NO_MEMORY; - } if (err != PREFERENCE_ERROR_NONE) { - ChipLogError(DeviceLayer, "Failed to get preference [%s]: %s", StringOrNullMarker(key), get_error_message(err)); - return CHIP_ERROR_INCORRECT_STATE; + if (err != PREFERENCE_ERROR_NO_KEY) + ChipLogError(DeviceLayer, "Failed to get preference [%s]: %s", StringOrNullMarker(key), get_error_message(err)); + return TizenToChipError(err); } size_t encodedDataSize = strlen(encodedData); @@ -104,15 +101,9 @@ CHIP_ERROR SaveData(const char * key, const void * data, size_t dataSize) encodedData[encodedDataSize] = '\0'; int err = preference_set_string(key, encodedData.Get()); - if (err == PREFERENCE_ERROR_OUT_OF_MEMORY) - { - return CHIP_ERROR_NO_MEMORY; - } - if (err != PREFERENCE_ERROR_NONE) - { - ChipLogError(DeviceLayer, "Failed to set preference [%s]: %s", StringOrNullMarker(key), get_error_message(err)); - return CHIP_ERROR_INCORRECT_STATE; - } + VerifyOrReturnError( + err == PREFERENCE_ERROR_NONE, TizenToChipError(err), + ChipLogError(DeviceLayer, "Failed to set preference [%s]: %s", StringOrNullMarker(key), get_error_message(err))); ChipLogDetail(DeviceLayer, "Save preference data: key=%s len=%u", key, static_cast(dataSize)); ChipLogByteSpan(DeviceLayer, ByteSpan(reinterpret_cast(data), dataSize)); @@ -123,14 +114,11 @@ CHIP_ERROR SaveData(const char * key, const void * data, size_t dataSize) CHIP_ERROR RemoveData(const char * key) { int err = preference_remove(key); - if (err == PREFERENCE_ERROR_NO_KEY) - { - return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - } if (err != PREFERENCE_ERROR_NONE) { - ChipLogError(DeviceLayer, "Failed to remove preference [%s]: %s", StringOrNullMarker(key), get_error_message(err)); - return CHIP_ERROR_INCORRECT_STATE; + if (err != PREFERENCE_ERROR_NO_KEY) + ChipLogError(DeviceLayer, "Failed to remove preference [%s]: %s", StringOrNullMarker(key), get_error_message(err)); + return TizenToChipError(err); } ChipLogProgress(DeviceLayer, "Remove preference data: key=%s", key); diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 3718028f869c0b..500943f660d67d 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -66,6 +66,7 @@ #include "CHIPDevicePlatformEvent.h" #include "ChipDeviceScanner.h" +#include "ErrorUtils.h" #include "SystemInfo.h" namespace chip { @@ -122,7 +123,7 @@ void BLEManagerImpl::GattConnectionStateChangedCb(int result, bool connected, co default: ChipLogError(DeviceLayer, "GATT %s failed: %s", connected ? "connection" : "disconnection", get_error_message(result)); if (connected) - sInstance.NotifyHandleConnectFailed(CHIP_ERROR_INTERNAL); + sInstance.NotifyHandleConnectFailed(TizenToChipError(result)); } } @@ -137,16 +138,18 @@ CHIP_ERROR BLEManagerImpl::_BleInitialize(void * userData) } ret = bt_initialize(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_initialize() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_initialize() failed: %s", get_error_message(ret))); ret = bt_adapter_set_state_changed_cb(__AdapterStateChangedCb, nullptr); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_set_state_changed_cb() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_set_state_changed_cb() failed: %s", get_error_message(ret))); ret = bt_gatt_server_initialize(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_initialize() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_initialize() failed: %s", get_error_message(ret))); ret = bt_gatt_set_connection_state_changed_cb(GattConnectionStateChangedCb, nullptr); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_set_state_changed_cb() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_set_state_changed_cb() failed: %s", get_error_message(ret))); // The hash table key is stored in the BLEConnection structure // and is freed by the __BLEConnectionFree() function. @@ -158,7 +161,7 @@ CHIP_ERROR BLEManagerImpl::_BleInitialize(void * userData) return CHIP_NO_ERROR; exit: - return CHIP_ERROR_INTERNAL; + return TizenToChipError(ret); } static int __GetAttInfo(bt_gatt_h gattHandle, char ** uuid, bt_gatt_type_e * type) @@ -196,12 +199,13 @@ void BLEManagerImpl::ReadValueRequestedCb(const char * remoteAddress, int reques ChipLogProgress(DeviceLayer, "Gatt read requested on %s: uuid=%s", __ConvertAttTypeToStr(type), StringOrNullMarker(uuid.get())); ret = bt_gatt_get_value(gattHandle, &MakeUniquePointerReceiver(value).Get(), &len); - VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_get_value() failed. ret: %d", ret)); + VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_get_value() failed: %s", get_error_message(ret))); ChipLogByteSpan(DeviceLayer, ByteSpan(Uint8::from_const_char(value.get()), len)); ret = bt_gatt_server_send_response(requestId, BT_GATT_REQUEST_TYPE_READ, offset, 0x00, value.get(), len); - VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_send_response() failed. ret: %d", ret)); + VerifyOrReturn(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_server_send_response() failed: %s", get_error_message(ret))); } void BLEManagerImpl::WriteValueRequestedCb(const char * remoteAddress, int requestId, bt_gatt_server_h server, bt_gatt_h gattHandle, @@ -222,15 +226,16 @@ void BLEManagerImpl::WriteValueRequestedCb(const char * remoteAddress, int reque ChipLogByteSpan(DeviceLayer, ByteSpan(Uint8::from_const_char(value), len)); ret = bt_gatt_set_value(gattHandle, value, len); - VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed. ret: %d", ret)); + VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed: %s", get_error_message(ret))); ret = bt_gatt_server_send_response(requestId, BT_GATT_REQUEST_TYPE_WRITE, offset, 0x00, nullptr, 0); - VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_send_response() failed. ret: %d", ret)); + VerifyOrReturn(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_server_send_response() failed: %s", get_error_message(ret))); sInstance.HandleC1CharWriteEvent(conn, Uint8::from_const_char(value), len); } -void BLEManagerImpl::NotificationStateChangedCb(bool notify, bt_gatt_server_h server, bt_gatt_h gattHandle, void * userData) +void BLEManagerImpl::NotificationStateChangedCb(bool notify, bt_gatt_server_h server, bt_gatt_h charHandle, void * userData) { GAutoPtr uuid; BLEConnection * conn = nullptr; @@ -248,8 +253,10 @@ void BLEManagerImpl::NotificationStateChangedCb(bool notify, bt_gatt_server_h se } VerifyOrReturn(conn != nullptr, ChipLogError(DeviceLayer, "Failed to find connection info")); - VerifyOrReturn(__GetAttInfo(gattHandle, &MakeUniquePointerReceiver(uuid).Get(), &type) == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from GATT handle")); + + int ret = __GetAttInfo(charHandle, &MakeUniquePointerReceiver(uuid).Get(), &type); + VerifyOrReturn(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from CHAR handle: %s", get_error_message(ret))); ChipLogProgress(DeviceLayer, "Notification State Changed %d on %s: %s", notify, __ConvertAttTypeToStr(type), StringOrNullMarker(uuid.get())); @@ -461,12 +468,13 @@ CHIP_ERROR BLEManagerImpl::ConnectChipThing(const char * address) ChipLogProgress(DeviceLayer, "ConnectRequest: Addr [%s]", StringOrNullMarker(address)); ret = bt_gatt_client_create(address, &sInstance.mGattClient); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Failed to create GATT client. ret [%d]", ret); - err = CHIP_ERROR_INTERNAL); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Failed to create GATT client: %s", get_error_message(ret)); + err = TizenToChipError(ret)); ret = bt_gatt_connect(address, false); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Failed to issue GATT connect request. ret [%d]", ret); - err = CHIP_ERROR_INTERNAL); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "Failed to issue GATT connect request: %s", get_error_message(ret)); + err = TizenToChipError(ret)); ChipLogProgress(DeviceLayer, "GATT Connect Issued"); @@ -538,25 +546,24 @@ void BLEManagerImpl::OnScanError(CHIP_ERROR err) ChipLogDetail(Ble, "BLE scan error: %" CHIP_ERROR_FORMAT, err.Format()); } -int BLEManagerImpl::RegisterGATTServer() +CHIP_ERROR BLEManagerImpl::RegisterGATTServer() { - int ret = BT_ERROR_NONE; - bt_gatt_server_h server = nullptr; bt_gatt_h service = nullptr; bt_gatt_h char1 = nullptr, char2 = nullptr; bt_gatt_h desc = nullptr; char desc_value[2] = { 0, 0 }; + int ret; ChipLogProgress(DeviceLayer, "Start GATT Service Registration"); // Create Server ret = bt_gatt_server_create(&server); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_create() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_create() failed: %s", get_error_message(ret))); // Create Service (BTP Service) ret = bt_gatt_service_create(chip_ble_service_uuid, BT_GATT_SERVICE_TYPE_PRIMARY, &service); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_service_create() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_service_create() failed: %s", get_error_message(ret))); // Create 1st Characteristic (Client TX Buffer) ret = bt_gatt_characteristic_create( @@ -565,44 +572,51 @@ int BLEManagerImpl::RegisterGATTServer() // consider to use WITHOUT_RESPONSE property in the future according to the CHIP Spec 4.16.3.2. BTP // GATT Service "CHIPoBLE_C1", strlen("CHIPoBLE_C1"), &char1); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_characteristic_create() failed: %s", get_error_message(ret))); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_characteristic_create() failed. ret: %d", ret)); ret = bt_gatt_server_set_write_value_requested_cb(char1, WriteValueRequestedCb, nullptr); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_server_set_write_value_requested_cb() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_gatt_server_set_write_value_requested_cb() failed: %s", get_error_message(ret))); + ret = bt_gatt_service_add_characteristic(service, char1); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_service_add_characteristic() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_service_add_characteristic() failed: %s", get_error_message(ret))); // Create 2nd Characteristic (Client RX Buffer) ret = bt_gatt_characteristic_create(chip_ble_char_c2_rx_uuid, BT_GATT_PERMISSION_READ, BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_INDICATE, "CHIPoBLE_C2", strlen("CHIPoBLE_C2"), &char2); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_characteristic_create() failed: %s", get_error_message(ret))); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_characteristic_create() failed. ret: %d", ret)); ret = bt_gatt_server_set_read_value_requested_cb(char2, ReadValueRequestedCb, nullptr); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_server_set_read_value_requested_cb() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_gatt_server_set_read_value_requested_cb() failed: %s", get_error_message(ret))); ret = bt_gatt_server_set_characteristic_notification_state_change_cb(char2, NotificationStateChangedCb, nullptr); - VerifyOrExit( - ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_server_set_characteristic_notification_state_change_cb() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_server_set_characteristic_notification_state_change_cb() failed: %s", + get_error_message(ret))); // Create CCC Descriptor ret = bt_gatt_descriptor_create(desc_uuid_short, BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE, desc_value, sizeof(desc_value), &desc); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_descriptor_create() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_descriptor_create() failed: %s", get_error_message(ret))); ret = bt_gatt_characteristic_add_descriptor(char2, desc); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_characteristic_add_descriptor() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_characteristic_add_descriptor() failed: %s", get_error_message(ret))); ret = bt_gatt_service_add_characteristic(service, char2); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_service_add_characteristic() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_service_add_characteristic() failed: %s", get_error_message(ret))); // Register Service to Server ret = bt_gatt_server_register_service(server, service); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_register_service() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_server_register_service() failed: %s", get_error_message(ret))); // Start Server ret = bt_gatt_server_start(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_start() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_server_start() failed: %s", get_error_message(ret))); ChipLogDetail(DeviceLayer, "NotifyBLEPeripheralGATTServerRegisterComplete Success"); BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete(true, nullptr); @@ -610,31 +624,25 @@ int BLEManagerImpl::RegisterGATTServer() // Save the Local Peripheral char1 & char2 handles mGattCharC1Handle = char1; mGattCharC2Handle = char2; - - return ret; + return CHIP_NO_ERROR; exit: ChipLogDetail(DeviceLayer, "NotifyBLEPeripheralGATTServerRegisterComplete Failed"); BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete(false, nullptr); - return ret; + return TizenToChipError(ret); } -int BLEManagerImpl::StartBLEAdvertising() +CHIP_ERROR BLEManagerImpl::StartBLEAdvertising() { - int ret = BT_ERROR_NONE; - CHIP_ERROR err = CHIP_NO_ERROR; - char service_data[sizeof(Ble::ChipBLEDeviceIdentificationInfo)] = { - 0x0, - }; // need to fill advertising data. 5.2.3.8.6. Advertising Data, CHIP Specification - Ble::ChipBLEDeviceIdentificationInfo deviceIdInfo = { - 0x0, - }; + Ble::ChipBLEDeviceIdentificationInfo deviceIdInfo; PlatformVersion version; + CHIP_ERROR err; + int ret; if (sInstance.mAdvReqInProgress) { ChipLogProgress(DeviceLayer, "Advertising Request In Progress"); - return ret; + return CHIP_NO_ERROR; } ChipLogProgress(DeviceLayer, "Start Advertising"); @@ -642,23 +650,25 @@ int BLEManagerImpl::StartBLEAdvertising() if (mAdvertiser == nullptr) { ret = bt_adapter_le_create_advertiser(&mAdvertiser); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_create_advertiser() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_create_advertiser() failed: %s", get_error_message(ret))); } else { ret = bt_adapter_le_clear_advertising_data(mAdvertiser, BT_ADAPTER_LE_PACKET_ADVERTISING); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_adapter_le_clear_advertising_data() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_adapter_le_clear_advertising_data() failed: %s", get_error_message(ret))); ret = bt_adapter_le_clear_advertising_data(mAdvertiser, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_adapter_le_clear_advertising_data() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_adapter_le_clear_advertising_data() failed: %s", get_error_message(ret))); } if (mFlags.Has(Flags::kFastAdvertisingEnabled)) { ret = bt_adapter_le_set_advertising_mode(mAdvertiser, BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_mode() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_mode() failed: %s", get_error_message(ret))); // NOTE: Check specification for recommended Advertising Interval range for Fast Advertising // ret = bt_adapter_le_set_advertising_interval(mAdvertiser, BT_LE_ADV_INTERVAL_MIN, BT_LE_ADV_INTERVAL_MIN); @@ -670,21 +680,22 @@ int BLEManagerImpl::StartBLEAdvertising() } err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(deviceIdInfo); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "GetBLEDeviceIdentificationInfo() failed. %s", ErrorStr(err))); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "GetBLEDeviceIdentificationInfo() failed: %" CHIP_ERROR_FORMAT, err.Format())); - memcpy(service_data, &deviceIdInfo, sizeof(service_data)); ret = bt_adapter_le_add_advertising_service_data(mAdvertiser, BT_ADAPTER_LE_PACKET_ADVERTISING, chip_ble_service_uuid_short, - service_data, sizeof(service_data)); + reinterpret_cast(&deviceIdInfo), sizeof(deviceIdInfo)); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_adapter_le_add_advertising_service_data() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_adapter_le_add_advertising_service_data() failed: %s", get_error_message(ret))); err = SystemInfo::GetPlatformVersion(version); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "GetPlatformVersion() failed. %s", ErrorStr(err))); + VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "GetPlatformVersion() failed: %" CHIP_ERROR_FORMAT, err.Format())); if (version.mMajor >= 8) { ret = bt_adapter_le_set_advertising_flags( mAdvertiser, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC | BT_ADAPTER_LE_ADVERTISING_FLAGS_BREDR_UNSUP); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_flags() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_flags() failed: %s", get_error_message(ret))); } else { @@ -693,33 +704,36 @@ int BLEManagerImpl::StartBLEAdvertising() ret = bt_adapter_le_set_advertising_device_name(mAdvertiser, BT_ADAPTER_LE_PACKET_ADVERTISING, true); VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_device_name() failed. ret: %d", ret)); + ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_device_name() failed: %s", get_error_message(ret))); BLEManagerImpl::NotifyBLEPeripheralAdvConfiguredComplete(true, nullptr); ret = bt_adapter_le_start_advertising_new(mAdvertiser, AdvertisingStateChangedCb, nullptr); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_start_advertising_new() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_start_advertising_new() failed: %s", get_error_message(ret))); + sInstance.mAdvReqInProgress = true; - return ret; + return CHIP_NO_ERROR; exit: BLEManagerImpl::NotifyBLEPeripheralAdvStartComplete(false, nullptr); - return ret; + return ret != BT_ERROR_NONE ? TizenToChipError(ret) : err; } -int BLEManagerImpl::StopBLEAdvertising() +CHIP_ERROR BLEManagerImpl::StopBLEAdvertising() { - int ret = BT_ERROR_NONE; - ChipLogProgress(DeviceLayer, "Stop Advertising"); - ret = bt_adapter_le_stop_advertising(mAdvertiser); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_stop_advertising() failed. ret: %d", ret)); + + int ret = bt_adapter_le_stop_advertising(mAdvertiser); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_stop_advertising() failed: %s", get_error_message(ret))); + sInstance.mAdvReqInProgress = true; - return ret; + return CHIP_NO_ERROR; exit: BLEManagerImpl::NotifyBLEPeripheralAdvStopComplete(false, nullptr); - return ret; + return TizenToChipError(ret); } static bool __GattClientForeachCharCb(int total, int index, bt_gatt_h charHandle, void * data) @@ -728,8 +742,9 @@ static bool __GattClientForeachCharCb(int total, int index, bt_gatt_h charHandle GAutoPtr uuid; auto conn = static_cast(data); - VerifyOrExit(__GetAttInfo(charHandle, &MakeUniquePointerReceiver(uuid).Get(), &type) == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from CHAR handle")); + int ret = __GetAttInfo(charHandle, &MakeUniquePointerReceiver(uuid).Get(), &type); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from CHAR handle: %s", get_error_message(ret))); if (strcasecmp(uuid.get(), chip_ble_char_c1_tx_uuid) == 0) { @@ -754,8 +769,9 @@ static bool __GattClientForeachServiceCb(int total, int index, bt_gatt_h svcHand auto conn = static_cast(data); ChipLogProgress(DeviceLayer, "__GattClientForeachServiceCb"); - VerifyOrExit(__GetAttInfo(svcHandle, &MakeUniquePointerReceiver(uuid).Get(), &type) == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from SVC handle")); + int ret = __GetAttInfo(svcHandle, &MakeUniquePointerReceiver(uuid).Get(), &type); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from SVC handle: %s", get_error_message(ret))); if (strcasecmp(uuid.get(), chip_ble_service_uuid) == 0) { @@ -776,9 +792,10 @@ static bool __GattClientForeachServiceCb(int total, int index, bt_gatt_h svcHand bool BLEManagerImpl::IsDeviceChipPeripheral(BLE_CONNECTION_OBJECT conId) { auto conn = static_cast(conId); + int ret; - if (bt_gatt_client_foreach_services(sInstance.mGattClient, __GattClientForeachServiceCb, conn) != BT_ERROR_NONE) - ChipLogError(DeviceLayer, "Error Browsing GATT services"); + if ((ret = bt_gatt_client_foreach_services(sInstance.mGattClient, __GattClientForeachServiceCb, conn)) != BT_ERROR_NONE) + ChipLogError(DeviceLayer, "Failed to browse GATT services: %s", get_error_message(ret)); return (conn->isChipDevice ? true : false); } @@ -900,16 +917,17 @@ void BLEManagerImpl::HandleConnectionEvent(bool connected, const char * remoteAd void BLEManagerImpl::DriveBLEState() { - int ret = BT_ERROR_NONE; + CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(DeviceLayer, "Enter DriveBLEState"); if (!mIsCentral && mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_Enabled && !mFlags.Has(Flags::kAppRegistered)) { - ret = RegisterGATTServer(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Register GATT Server Failed. ret: %d", ret)); + err = RegisterGATTServer(); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to register GATT server: %" CHIP_ERROR_FORMAT, err.Format())); - ChipLogProgress(DeviceLayer, "GATT Service Registered"); + ChipLogProgress(DeviceLayer, "GATT server registered"); mFlags.Set(Flags::kAppRegistered); ExitNow(); } @@ -918,30 +936,35 @@ void BLEManagerImpl::DriveBLEState() { if (!mFlags.Has(Flags::kAdvertising)) { - ret = StartBLEAdvertising(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Start Advertising Failed. ret: %d", ret)); + err = StartBLEAdvertising(); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to start BLE advertising: %" CHIP_ERROR_FORMAT, err.Format())); } else if (mFlags.Has(Flags::kAdvertisingRefreshNeeded)) { - ChipLogProgress(DeviceLayer, "Advertising Refreshed Needed. Stop Advertising"); - ret = StopBLEAdvertising(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Stop Advertising Failed. ret: %d", ret)); + ChipLogProgress(DeviceLayer, "BLE advertising refreshed needed. Stop BLE advertising"); + err = StopBLEAdvertising(); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to stop BLE advertising %" CHIP_ERROR_FORMAT, err.Format())); } } else if (mFlags.Has(Flags::kAdvertising)) { - ChipLogProgress(DeviceLayer, "Stop Advertising"); + ChipLogProgress(DeviceLayer, "Stop BLE advertising"); - ret = StopBLEAdvertising(); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "Stop Advertising Failed. ret: %d", ret)); + err = StopBLEAdvertising(); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to stop BLE advertising: %" CHIP_ERROR_FORMAT, err.Format())); - ret = bt_adapter_le_destroy_advertiser(mAdvertiser); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_destroy_advertiser() failed. ret: %d", ret)); + int ret = bt_adapter_le_destroy_advertiser(mAdvertiser); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_adapter_le_destroy_advertiser() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); mAdvertiser = nullptr; } exit: - if (ret != BT_ERROR_NONE) + if (err != CHIP_NO_ERROR) { mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; } @@ -965,7 +988,7 @@ CHIP_ERROR BLEManagerImpl::_Init() err = PlatformMgrImpl().GLibMatterContextInvokeSync(_BleInitialize, static_cast(nullptr)); SuccessOrExit(err); - PlatformMgr().ScheduleWork(DriveBLEState, 0); + return PlatformMgr().ScheduleWork(DriveBLEState, 0); exit: return err; @@ -974,14 +997,13 @@ CHIP_ERROR BLEManagerImpl::_Init() void BLEManagerImpl::_Shutdown() { int ret = bt_deinitialize(); - VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_deinitialize() failed. ret: %d", ret)); + VerifyOrReturn(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_deinitialize() failed: %s", get_error_message(ret))); } CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { mFlags.Set(Flags::kAdvertisingEnabled, val); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - return CHIP_NO_ERROR; + return PlatformMgr().ScheduleWork(DriveBLEState, 0); } CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) @@ -998,8 +1020,7 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) return CHIP_ERROR_INVALID_ARGUMENT; } mFlags.Set(Flags::kAdvertisingRefreshNeeded); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - return CHIP_NO_ERROR; + return PlatformMgr().ScheduleWork(DriveBLEState, 0); } CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) @@ -1013,7 +1034,7 @@ CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) ret = bt_adapter_get_name(&deviceName); if (ret != BT_ERROR_NONE) { - ChipLogError(DeviceLayer, "bt_adapter_get_name() failed. ret: %d", ret); + ChipLogError(DeviceLayer, "bt_adapter_get_name() failed: %s", get_error_message(ret)); return CHIP_ERROR_INTERNAL; } @@ -1037,7 +1058,7 @@ CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) ret = bt_adapter_set_name(deviceName); if (ret != BT_ERROR_NONE) { - ChipLogError(DeviceLayer, "bt_adapter_set_name() failed. ret: %d", ret); + ChipLogError(DeviceLayer, "bt_adapter_set_name() failed: %s", get_error_message(ret)); return CHIP_ERROR_INTERNAL; } @@ -1190,7 +1211,7 @@ bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID service_uuid; Ble::ChipBleUUID char_notif_uuid; auto conn = static_cast(conId); - int ret = BT_ERROR_NONE; + int ret; ChipLogProgress(DeviceLayer, "SubscribeCharacteristic"); @@ -1204,13 +1225,16 @@ bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipLogError(DeviceLayer, "SubscribeCharacteristic() called with invalid characteristic ID")); VerifyOrExit(conn->gattCharC2Handle != nullptr, ChipLogError(DeviceLayer, "Char C2 is null")); - ChipLogProgress(DeviceLayer, "Sending Notification Enable Request to CHIP Peripheral(con %s)", conn->peerAddr); + ChipLogProgress(DeviceLayer, "Sending Notification Enable Request to CHIP Peripheral: %s", conn->peerAddr); ret = bt_gatt_client_set_characteristic_value_changed_cb(conn->gattCharC2Handle, CharacteristicNotificationCb, conn); - VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_client_set_characteristic_value_changed_cb() failed. ret: %d", ret)); + VerifyOrExit( + ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_client_set_characteristic_value_changed_cb() failed: %s", get_error_message(ret))); + sInstance.NotifySubscribeOpComplete(conn, true); return true; + exit: return false; } @@ -1221,7 +1245,7 @@ bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, cons Ble::ChipBleUUID service_uuid; Ble::ChipBleUUID char_notif_uuid; auto conn = static_cast(conId); - int ret = BT_ERROR_NONE; + int ret; ChipLogProgress(DeviceLayer, "UnSubscribeCharacteristic"); @@ -1235,13 +1259,16 @@ bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, cons ChipLogError(DeviceLayer, "UnSubscribeCharacteristic() called with invalid characteristic ID")); VerifyOrExit(conn->gattCharC2Handle != nullptr, ChipLogError(DeviceLayer, "Char C2 is null")); - ChipLogProgress(DeviceLayer, "Disable Notification Request to CHIP Peripheral(con %s)", conn->peerAddr); + ChipLogProgress(DeviceLayer, "Disable Notification Request to CHIP Peripheral: %s", conn->peerAddr); ret = bt_gatt_client_unset_characteristic_value_changed_cb(conn->gattCharC2Handle); - VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_client_unset_characteristic_value_changed_cb() failed. ret: %d", ret)); + VerifyOrExit( + ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_client_unset_characteristic_value_changed_cb() failed: %s", get_error_message(ret))); + sInstance.NotifySubscribeOpComplete(conn, false); return true; + exit: return false; } @@ -1249,7 +1276,7 @@ bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, cons bool BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) { auto conn = static_cast(conId); - int ret = BT_ERROR_NONE; + int ret; ChipLogProgress(DeviceLayer, "Close BLE Connection"); @@ -1258,7 +1285,7 @@ bool BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) ChipLogProgress(DeviceLayer, "Send GATT disconnect to [%s]", conn->peerAddr); ret = bt_gatt_disconnect(conn->peerAddr); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_disconnect() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_disconnect() failed: %s", get_error_message(ret))); RemoveConnectionData(conn->peerAddr); return true; @@ -1271,7 +1298,7 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const Ble::Chip System::PacketBufferHandle pBuf) { auto conn = static_cast(conId); - int ret = BT_ERROR_NONE; + int ret; ChipLogProgress(DeviceLayer, "SendIndication"); @@ -1279,14 +1306,15 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const Ble::Chip VerifyOrExit(conn != nullptr, ChipLogError(DeviceLayer, "Failed to find connection info")); ret = bt_gatt_set_value(mGattCharC2Handle, Uint8::to_const_char(pBuf->Start()), pBuf->DataLength()); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed: %s", get_error_message(ret))); ChipLogProgress(DeviceLayer, "Sending indication for CHIPoBLE RX characteristic (con %s, len %u)", conn->peerAddr, pBuf->DataLength()); ret = bt_gatt_server_notify_characteristic_changed_value(mGattCharC2Handle, IndicationConfirmationCb, conn->peerAddr, nullptr); - VerifyOrExit(ret == BT_ERROR_NONE, - ChipLogError(DeviceLayer, "bt_gatt_server_notify_characteristic_changed_value() failed. ret: %d", ret)); + VerifyOrExit( + ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_server_notify_characteristic_changed_value() failed: %s", get_error_message(ret))); return true; exit: @@ -1299,7 +1327,7 @@ bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const Ble::Ch Ble::ChipBleUUID service_uuid; Ble::ChipBleUUID char_write_uuid; auto conn = static_cast(conId); - int ret = BT_ERROR_NONE; + int ret; ChipLogProgress(DeviceLayer, "SendWriteRequest"); @@ -1314,13 +1342,14 @@ bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const Ble::Ch VerifyOrExit(conn->gattCharC1Handle != nullptr, ChipLogError(DeviceLayer, "Char C1 is null")); ret = bt_gatt_set_value(conn->gattCharC1Handle, Uint8::to_const_char(pBuf->Start()), pBuf->DataLength()); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_set_value() failed: %s", get_error_message(ret))); ChipLogProgress(DeviceLayer, "Sending Write Request for CHIPoBLE TX characteristic (con %s, len %u)", conn->peerAddr, pBuf->DataLength()); ret = bt_gatt_client_write_value(conn->gattCharC1Handle, WriteCompletedCb, conn); - VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_client_write_value() failed. ret: %d", ret)); + VerifyOrExit(ret == BT_ERROR_NONE, + ChipLogError(DeviceLayer, "bt_gatt_client_write_value() failed: %s", get_error_message(ret))); return true; exit: return false; @@ -1360,11 +1389,9 @@ void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const S void BLEManagerImpl::InitiateScan(BleScanState scanType) { CHIP_ERROR err = CHIP_NO_ERROR; - ScanFilterData data = { - { 0x0 }, - }; + ScanFilterData data = {}; - ChipLogProgress(DeviceLayer, "Initiate Scan"); + ChipLogProgress(DeviceLayer, "Initiate scan"); /* Check Scanning state */ if (scanType == BleScanState::kNotScanning) @@ -1377,13 +1404,9 @@ void BLEManagerImpl::InitiateScan(BleScanState scanType) if (!mFlags.Has(Flags::kTizenBLELayerInitialized)) { err = CHIP_ERROR_INCORRECT_STATE; - ChipLogError(DeviceLayer, "Tizen BLE Layer is not yet initialized"); + ChipLogError(DeviceLayer, "Tizen BLE layer is not yet initialized"); goto exit; } - /* Setup ScanFilter */ - memset(&data.service_data, 0x00, sizeof(data.service_data)); - data.service_data_len = 0; - strcpy(data.service_uuid, chip_ble_service_uuid_short); /* Acquire Chip Device Scanner */ if (!mDeviceScanner) @@ -1392,13 +1415,14 @@ void BLEManagerImpl::InitiateScan(BleScanState scanType) if (!mDeviceScanner) { err = CHIP_ERROR_INTERNAL; - ChipLogError(DeviceLayer, "Failed to create a BLE device scanner"); + ChipLogError(DeviceLayer, "Failed to create BLE device scanner"); goto exit; } /* Send StartChipScan Request to Scanner Class */ + strcpy(data.service_uuid, chip_ble_service_uuid_short); err = mDeviceScanner->StartChipScan(kNewConnectionScanTimeout, ScanFilterType::kServiceData, data); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "Failed to start a BLE scan")); + VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "Failed to start BLE scan")); ChipLogProgress(DeviceLayer, "BLE scan initiation successful"); mBLEScanConfig.mBleScanState = scanType; diff --git a/src/platform/Tizen/BLEManagerImpl.h b/src/platform/Tizen/BLEManagerImpl.h index 9a625d2937d5f4..d0080ecee561dd 100644 --- a/src/platform/Tizen/BLEManagerImpl.h +++ b/src/platform/Tizen/BLEManagerImpl.h @@ -215,9 +215,9 @@ class BLEManagerImpl final : public BLEManager, void NotifySubscribeOpComplete(BLE_CONNECTION_OBJECT conId, bool isSubscribed); void NotifyBLENotificationReceived(System::PacketBufferHandle & buf, BLE_CONNECTION_OBJECT conId); - int RegisterGATTServer(); - int StartBLEAdvertising(); - int StopBLEAdvertising(); + CHIP_ERROR RegisterGATTServer(); + CHIP_ERROR StartBLEAdvertising(); + CHIP_ERROR StopBLEAdvertising(); void CleanScanConfig(); CHIPoBLEServiceMode mServiceMode; diff --git a/src/platform/Tizen/BUILD.gn b/src/platform/Tizen/BUILD.gn index eb2df408099114..0d0f329be1bd5e 100644 --- a/src/platform/Tizen/BUILD.gn +++ b/src/platform/Tizen/BUILD.gn @@ -47,6 +47,8 @@ static_library("Tizen") { "DeviceInstanceInfoProviderImpl.h", "DiagnosticDataProviderImpl.cpp", "DiagnosticDataProviderImpl.h", + "ErrorUtils.cpp", + "ErrorUtils.h", "InetPlatformConfig.h", "KeyValueStoreManagerImpl.cpp", "KeyValueStoreManagerImpl.h", diff --git a/src/platform/Tizen/ChipDeviceScanner.cpp b/src/platform/Tizen/ChipDeviceScanner.cpp index 6bf80c63c48006..aea5aabd7d0799 100644 --- a/src/platform/Tizen/ChipDeviceScanner.cpp +++ b/src/platform/Tizen/ChipDeviceScanner.cpp @@ -173,15 +173,11 @@ static bool __IsScanFilterSupported() return is_supported; } -void ChipDeviceScanner::CheckScanFilter(ScanFilterType filterType, ScanFilterData & filterData) +int ChipDeviceScanner::SetupScanFilter(ScanFilterType filterType, const ScanFilterData & filterData) { - int ret = BT_ERROR_NONE; - - // Scan Filter check - if (!__IsScanFilterSupported()) - return; + VerifyOrReturnValue(__IsScanFilterSupported(), BT_ERROR_NONE, ChipLogError(DeviceLayer, "BLE scan filter not supported")); - ret = CreateLEScanFilter(filterType, filterData); + int ret = CreateLEScanFilter(filterType); VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "BLE scan filter creation failed: %s. Do Normal Scan", get_error_message(ret))); @@ -189,19 +185,21 @@ void ChipDeviceScanner::CheckScanFilter(ScanFilterType filterType, ScanFilterDat VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "BLE scan filter registration failed: %s. Do Normal Scan", get_error_message(ret))); - return; + return ret; exit: UnRegisterScanFilter(); + return ret; } -CHIP_ERROR ChipDeviceScanner::StartChipScan(System::Clock::Timeout timeout, ScanFilterType filterType, ScanFilterData & filterData) +CHIP_ERROR ChipDeviceScanner::StartChipScan(System::Clock::Timeout timeout, ScanFilterType filterType, + const ScanFilterData & filterData) { CHIP_ERROR err = CHIP_NO_ERROR; ReturnErrorCodeIf(mIsScanning, CHIP_ERROR_INCORRECT_STATE); // Scan Filter Setup if supported: silently bypass error & do filterless scan in case of error - CheckScanFilter(filterType, filterData); + SetupScanFilter(filterType, filterData); mScanTimeoutMs = System::Clock::Milliseconds32(timeout).count(); @@ -251,7 +249,7 @@ void ChipDeviceScanner::UnRegisterScanFilter() } } -int ChipDeviceScanner::RegisterScanFilter(ScanFilterType filterType, ScanFilterData & filterData) +int ChipDeviceScanner::RegisterScanFilter(ScanFilterType filterType, const ScanFilterData & filterData) { int ret = BT_ERROR_NONE; @@ -293,7 +291,7 @@ int ChipDeviceScanner::RegisterScanFilter(ScanFilterType filterType, ScanFilterD return ret; } -int ChipDeviceScanner::CreateLEScanFilter(ScanFilterType filterType, ScanFilterData & filterData) +int ChipDeviceScanner::CreateLEScanFilter(ScanFilterType filterType) { int ret = bt_adapter_le_scan_filter_create(&mScanFilter); VerifyOrExit(ret == BT_ERROR_NONE, diff --git a/src/platform/Tizen/ChipDeviceScanner.h b/src/platform/Tizen/ChipDeviceScanner.h index b7220fb55a7db9..09b5a6d5f39e15 100644 --- a/src/platform/Tizen/ChipDeviceScanner.h +++ b/src/platform/Tizen/ChipDeviceScanner.h @@ -86,7 +86,7 @@ class ChipDeviceScanner ~ChipDeviceScanner(void); /// Initiate a scan for devices, with the given timeout & scan filter data - CHIP_ERROR StartChipScan(System::Clock::Timeout timeout, ScanFilterType filterType, ScanFilterData & filterData); + CHIP_ERROR StartChipScan(System::Clock::Timeout timeout, ScanFilterType filterType, const ScanFilterData & filterData); /// Stop any currently running scan CHIP_ERROR StopChipScan(void); @@ -99,10 +99,11 @@ class ChipDeviceScanner static void LeScanResultCb(int result, bt_adapter_le_device_scan_result_info_s * info, void * userData); static gboolean TimerExpiredCb(gpointer user_data); static CHIP_ERROR TriggerScan(ChipDeviceScanner * userData); - void CheckScanFilter(ScanFilterType filterType, ScanFilterData & filterData); - int RegisterScanFilter(ScanFilterType filterType, ScanFilterData & filterData); - void UnRegisterScanFilter(void); - int CreateLEScanFilter(ScanFilterType filterType, ScanFilterData & filterData); + + int CreateLEScanFilter(ScanFilterType filterType); + int RegisterScanFilter(ScanFilterType filterType, const ScanFilterData & filterData); + int SetupScanFilter(ScanFilterType filterType, const ScanFilterData & filterData); + void UnRegisterScanFilter(); ChipDeviceScannerDelegate * mDelegate = nullptr; bool mIsScanning = false; diff --git a/src/platform/Tizen/ConnectivityUtils.cpp b/src/platform/Tizen/ConnectivityUtils.cpp index 15a8ec60fd3a06..d3c82885352791 100644 --- a/src/platform/Tizen/ConnectivityUtils.cpp +++ b/src/platform/Tizen/ConnectivityUtils.cpp @@ -17,9 +17,7 @@ #include "ConnectivityUtils.h" -#include -#include - +#include #include #include #include @@ -33,52 +31,170 @@ #include #include +#include +#include using namespace ::chip::app::Clusters::GeneralDiagnostics; using namespace ::chip::app::Clusters::EthernetNetworkDiagnostics; -namespace chip { -namespace DeviceLayer { -namespace Internal { +namespace { -uint16_t ConnectivityUtils::MapChannelToFrequency(const uint16_t inBand, const uint8_t inChannel) +constexpr uint16_t Map2400MHz(const uint8_t inChannel) { - uint16_t frequency = 0; - - if (inBand == kWiFi_BAND_2_4_GHZ) - { - frequency = Map2400MHz(inChannel); - } - else if (inBand == kWiFi_BAND_5_0_GHZ) - { - frequency = Map5000MHz(inChannel); - } - - return frequency; + if (inChannel >= 1 && inChannel <= 13) + return static_cast(2412 + ((inChannel - 1) * 5)); + if (inChannel == 14) + return 2484; + return 0; } -uint8_t ConnectivityUtils::MapFrequencyToChannel(const uint16_t frequency) +constexpr uint8_t MapFrequencyToChannel(const uint16_t frequency) { if (frequency < 2412) return 0; - if (frequency < 2484) return static_cast((frequency - 2407) / 5); - if (frequency == 2484) return 14; - return static_cast(frequency / 5 - 1000); } -InterfaceTypeEnum ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) +constexpr uint16_t Map5000MHz(const uint8_t inChannel) +{ + switch (inChannel) + { + case 183: + return 4915; + case 184: + return 4920; + case 185: + return 4925; + case 187: + return 4935; + case 188: + return 4940; + case 189: + return 4945; + case 192: + return 4960; + case 196: + return 4980; + case 7: + return 5035; + case 8: + return 5040; + case 9: + return 5045; + case 11: + return 5055; + case 12: + return 5060; + case 16: + return 5080; + case 34: + return 5170; + case 36: + return 5180; + case 38: + return 5190; + case 40: + return 5200; + case 42: + return 5210; + case 44: + return 5220; + case 46: + return 5230; + case 48: + return 5240; + case 52: + return 5260; + case 56: + return 5280; + case 60: + return 5300; + case 64: + return 5320; + case 100: + return 5500; + case 104: + return 5520; + case 108: + return 5540; + case 112: + return 5560; + case 116: + return 5580; + case 120: + return 5600; + case 124: + return 5620; + case 128: + return 5640; + case 132: + return 5660; + case 136: + return 5680; + case 140: + return 5700; + case 149: + return 5745; + case 153: + return 5765; + case 157: + return 5785; + case 161: + return 5805; + case 165: + return 5825; + default: + return 0; + } +} + +constexpr double ConvertFrequencyToFloat(const iw_freq * in) +{ + double result = (double) in->m; + for (int i = 0; i < in->e; i++) + result *= 10; + return result; +} + +CHIP_ERROR GetWiFiParameter(int sock, /* Socket to the kernel */ + const char * ifname, /* Device name */ + int request, /* WE ID */ + struct iwreq * pwrq) /* Fixed part of the request */ +{ + chip::Platform::CopyString(pwrq->ifr_name, ifname); + if (ioctl(sock, request, pwrq) == -1) + return CHIP_ERROR_POSIX(errno); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GetWiFiStats(int sock, const char * ifname, struct iw_statistics * stats) +{ + struct iwreq wrq = {}; + wrq.u.data.pointer = (caddr_t) stats; + wrq.u.data.length = sizeof(*stats); + wrq.u.data.flags = 1; /* Clear updated flag */ + return GetWiFiParameter(sock, ifname, SIOCGIWSTATS, &wrq); +} + +} // namespace + +namespace chip { +namespace DeviceLayer { +namespace Internal { +namespace ConnectivityUtils { + +InterfaceTypeEnum GetInterfaceConnectionType(const char * ifname) { InterfaceTypeEnum ret = InterfaceTypeEnum::kUnspecified; int sock = -1; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { - ChipLogError(DeviceLayer, "Failed to open socket"); + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno)); return ret; } @@ -107,48 +223,39 @@ InterfaceTypeEnum ConnectivityUtils::GetInterfaceConnectionType(const char * ifn return ret; } -CHIP_ERROR ConnectivityUtils::GetInterfaceHardwareAddrs(const char * ifname, uint8_t * buf, size_t bufSize) +CHIP_ERROR GetInterfaceHardwareAddrs(const char * ifname, uint8_t * buf, size_t bufSize) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; - int skfd; + CHIP_ERROR err = CHIP_NO_ERROR; - if (ifname[0] == '\0') - { - ChipLogError(DeviceLayer, "Invalid argument for interface name"); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); struct ifreq req; Platform::CopyString(req.ifr_name, ifname); - if (ioctl(skfd, SIOCGIFHWADDR, &req) != -1) - { - // Copy 48-bit IEEE MAC Address - VerifyOrReturnError(bufSize >= 6, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrExit(ioctl(sock, SIOCGIFHWADDR, &req) != -1, err = CHIP_ERROR_POSIX(errno); + ChipLogError(DeviceLayer, "Failed to get hardware address: %s", strerror(errno))); - memset(buf, 0, bufSize); - memcpy(buf, req.ifr_ifru.ifru_hwaddr.sa_data, 6); - err = CHIP_NO_ERROR; - } + // Copy 48-bit IEEE MAC Address + VerifyOrExit(bufSize >= 6, err = CHIP_ERROR_BUFFER_TOO_SMALL); + + memset(buf, 0, bufSize); + memcpy(buf, req.ifr_ifru.ifru_hwaddr.sa_data, 6); - close(skfd); +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetInterfaceIPv4Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp) +CHIP_ERROR GetInterfaceIPv4Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp) { CHIP_ERROR err = CHIP_ERROR_READ_FAILED; struct ifaddrs * ifaddr = nullptr; if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } uint8_t index = 0; @@ -182,15 +289,15 @@ CHIP_ERROR ConnectivityUtils::GetInterfaceIPv4Addrs(const char * ifname, uint8_t return err; } -CHIP_ERROR ConnectivityUtils::GetInterfaceIPv6Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp) +CHIP_ERROR GetInterfaceIPv6Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp) { CHIP_ERROR err = CHIP_ERROR_READ_FAILED; struct ifaddrs * ifaddr = nullptr; if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } uint8_t index = 0; @@ -224,15 +331,15 @@ CHIP_ERROR ConnectivityUtils::GetInterfaceIPv6Addrs(const char * ifname, uint8_t return err; } -CHIP_ERROR ConnectivityUtils::GetWiFiInterfaceName(char * ifname, size_t bufSize) +CHIP_ERROR GetWiFiInterfaceName(char * ifname, size_t bufSize) { CHIP_ERROR err = CHIP_ERROR_READ_FAILED; struct ifaddrs * ifaddr = nullptr; if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; @@ -250,60 +357,51 @@ CHIP_ERROR ConnectivityUtils::GetWiFiInterfaceName(char * ifname, size_t bufSize return err; } -CHIP_ERROR ConnectivityUtils::GetWiFiChannelNumber(const char * ifname, uint16_t & channelNumber) +CHIP_ERROR GetWiFiChannelNumber(const char * ifname, uint16_t & channelNumber) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + CHIP_ERROR err; struct iwreq wrq; - int skfd; + double freq; - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); - if ((err = GetWiFiParameter(skfd, ifname, SIOCGIWFREQ, &wrq)) == CHIP_NO_ERROR) - { - double freq = ConvertFrequenceToFloat(&(wrq.u.freq)); - VerifyOrReturnError((freq / 1000000) <= UINT16_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); - channelNumber = MapFrequencyToChannel(static_cast(freq / 1000000)); + err = GetWiFiParameter(sock, ifname, SIOCGIWFREQ, &wrq); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to get channel/frequency: %" CHIP_ERROR_FORMAT, err.Format())); - err = CHIP_NO_ERROR; - } - else - { - ChipLogError(DeviceLayer, "Failed to get channel/frequency (Hz).") - } + freq = ConvertFrequencyToFloat(&(wrq.u.freq)); + VerifyOrExit((freq / 1000000) <= UINT16_MAX, err = CHIP_ERROR_INVALID_INTEGER_VALUE); + channelNumber = MapFrequencyToChannel(static_cast(freq / 1000000)); - close(skfd); +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetWiFiRssi(const char * ifname, int8_t & rssi) +CHIP_ERROR GetWiFiRssi(const char * ifname, int8_t & rssi) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + CHIP_ERROR err; struct iw_statistics stats; - int skfd; - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); + + err = GetWiFiStats(sock, ifname, &stats); + VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "Failed to get Wi-Fi stats: %" CHIP_ERROR_FORMAT, err.Format())); - if ((err = GetWiFiStats(skfd, ifname, &stats)) == CHIP_NO_ERROR) { struct iw_quality * qual = &stats.qual; - if (qual->updated & IW_QUAL_RCPI) { /* RCPI = int{(Power in dBm +110)*2} for 0dbm > Power > -110dBm */ if (!(qual->updated & IW_QUAL_LEVEL_INVALID)) { double rcpilevel = (qual->level / 2.0) - 110.0; - VerifyOrReturnError(rcpilevel <= INT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + VerifyOrExit(rcpilevel <= INT8_MAX, err = CHIP_ERROR_INVALID_INTEGER_VALUE); rssi = static_cast(rcpilevel); - err = CHIP_NO_ERROR; } } else @@ -317,88 +415,74 @@ CHIP_ERROR ConnectivityUtils::GetWiFiRssi(const char * ifname, int8_t & rssi) if (qual->level >= 64) dblevel -= 0x100; - VerifyOrReturnError(dblevel <= INT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + VerifyOrExit(dblevel <= INT8_MAX, err = CHIP_ERROR_INVALID_INTEGER_VALUE); rssi = static_cast(dblevel); - err = CHIP_NO_ERROR; } } else { if (!(qual->updated & IW_QUAL_LEVEL_INVALID)) { - VerifyOrReturnError(qual->level <= INT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + VerifyOrExit(qual->level <= INT8_MAX, err = CHIP_ERROR_INVALID_INTEGER_VALUE); rssi = static_cast(qual->level); - err = CHIP_NO_ERROR; } } } } - else - { - ChipLogError(DeviceLayer, "Failed to get /proc/net/wireless stats.") - } - close(skfd); +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetWiFiBeaconLostCount(const char * ifname, uint32_t & beaconLostCount) +CHIP_ERROR GetWiFiBeaconLostCount(const char * ifname, uint32_t & beaconLostCount) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + CHIP_ERROR err; struct iw_statistics stats; - int skfd; - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); - if (GetWiFiStats(skfd, ifname, &stats) == CHIP_NO_ERROR) - { - beaconLostCount = stats.miss.beacon; - err = CHIP_NO_ERROR; - } + err = GetWiFiStats(sock, ifname, &stats); + VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "Failed to get Wi-Fi stats: %" CHIP_ERROR_FORMAT, err.Format())); - close(skfd); + beaconLostCount = stats.miss.beacon; + +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetWiFiCurrentMaxRate(const char * ifname, uint64_t & currentMaxRate) +CHIP_ERROR GetWiFiCurrentMaxRate(const char * ifname, uint64_t & currentMaxRate) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + CHIP_ERROR err; struct iwreq wrq; - int skfd; - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); - if ((err = GetWiFiParameter(skfd, ifname, SIOCGIWRATE, &wrq)) == CHIP_NO_ERROR) - { - currentMaxRate = wrq.u.bitrate.value; - err = CHIP_NO_ERROR; - } - else - { - ChipLogError(DeviceLayer, "Failed to get channel/frequency (Hz).") - } + err = GetWiFiParameter(sock, ifname, SIOCGIWRATE, &wrq); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to get channel/frequency: %" CHIP_ERROR_FORMAT, err.Format())); - close(skfd); + currentMaxRate = wrq.u.bitrate.value; + +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetEthInterfaceName(char * ifname, size_t bufSize) +CHIP_ERROR GetEthInterfaceName(char * ifname, size_t bufSize) { CHIP_ERROR err = CHIP_ERROR_READ_FAILED; struct ifaddrs * ifaddr = nullptr; if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; @@ -416,11 +500,9 @@ CHIP_ERROR ConnectivityUtils::GetEthInterfaceName(char * ifname, size_t bufSize) return err; } -CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, PHYRateEnum & pHYRate) +CHIP_ERROR GetEthPHYRate(const char * ifname, PHYRateEnum & pHYRate) { - CHIP_ERROR err = CHIP_NO_ERROR; - - int skfd; + CHIP_ERROR err = CHIP_NO_ERROR; uint32_t speed = 0; struct ethtool_cmd ecmd = {}; ecmd.cmd = ETHTOOL_GSET; @@ -429,18 +511,12 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, PHYRateEnum & p ifr.ifr_data = reinterpret_cast(&ecmd); Platform::CopyString(ifr.ifr_name, ifname); - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); - if (ioctl(skfd, SIOCETHTOOL, &ifr) == -1) - { - ChipLogError(DeviceLayer, "Cannot get device settings"); - close(skfd); - return CHIP_ERROR_READ_FAILED; - } + VerifyOrExit(ioctl(sock, SIOCETHTOOL, &ifr) != -1, err = CHIP_ERROR_POSIX(errno); + ChipLogError(DeviceLayer, "Cannot get device settings: %s", strerror(errno))); speed = (ecmd.speed_hi << 16) | ecmd.speed; switch (speed) @@ -481,16 +557,14 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, PHYRateEnum & p break; }; - close(skfd); - +exit: + close(sock); return err; } -CHIP_ERROR ConnectivityUtils::GetEthFullDuplex(const char * ifname, bool & fullDuplex) +CHIP_ERROR GetEthFullDuplex(const char * ifname, bool & fullDuplex) { - CHIP_ERROR err = CHIP_ERROR_READ_FAILED; - - int skfd; + CHIP_ERROR err = CHIP_NO_ERROR; struct ethtool_cmd ecmd = {}; ecmd.cmd = ETHTOOL_GSET; struct ifreq ifr = {}; @@ -498,216 +572,21 @@ CHIP_ERROR ConnectivityUtils::GetEthFullDuplex(const char * ifname, bool & fullD ifr.ifr_data = reinterpret_cast(&ecmd); Platform::CopyString(ifr.ifr_name, ifname); - if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - ChipLogError(DeviceLayer, "Failed to create a channel to the NET kernel."); - return CHIP_ERROR_OPEN_FAILED; - } + int sock = socket(AF_INET, SOCK_DGRAM, 0); + VerifyOrReturnError(sock != -1, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "Failed to create INET socket: %s", strerror(errno))); - if (ioctl(skfd, SIOCETHTOOL, &ifr) == -1) - { - ChipLogError(DeviceLayer, "Cannot get device settings"); - err = CHIP_ERROR_READ_FAILED; - } - else - { - fullDuplex = ecmd.duplex == DUPLEX_FULL; - err = CHIP_NO_ERROR; - } + VerifyOrExit(ioctl(sock, SIOCETHTOOL, &ifr) != -1, err = CHIP_ERROR_POSIX(errno); + ChipLogError(DeviceLayer, "Cannot get device settings: %s", strerror(errno))); - close(skfd); + fullDuplex = ecmd.duplex == DUPLEX_FULL; +exit: + close(sock); return err; } -uint16_t ConnectivityUtils::Map2400MHz(const uint8_t inChannel) -{ - uint16_t frequency = 0; - - if (inChannel >= 1 && inChannel <= 13) - { - frequency = static_cast(2412 + ((inChannel - 1) * 5)); - } - else if (inChannel == 14) - { - frequency = 2484; - } - - return frequency; -} - -uint16_t ConnectivityUtils::Map5000MHz(const uint8_t inChannel) -{ - uint16_t frequency = 0; - - switch (inChannel) - { - case 183: - frequency = 4915; - break; - case 184: - frequency = 4920; - break; - case 185: - frequency = 4925; - break; - case 187: - frequency = 4935; - break; - case 188: - frequency = 4940; - break; - case 189: - frequency = 4945; - break; - case 192: - frequency = 4960; - break; - case 196: - frequency = 4980; - break; - case 7: - frequency = 5035; - break; - case 8: - frequency = 5040; - break; - case 9: - frequency = 5045; - break; - case 11: - frequency = 5055; - break; - case 12: - frequency = 5060; - break; - case 16: - frequency = 5080; - break; - case 34: - frequency = 5170; - break; - case 36: - frequency = 5180; - break; - case 38: - frequency = 5190; - break; - case 40: - frequency = 5200; - break; - case 42: - frequency = 5210; - break; - case 44: - frequency = 5220; - break; - case 46: - frequency = 5230; - break; - case 48: - frequency = 5240; - break; - case 52: - frequency = 5260; - break; - case 56: - frequency = 5280; - break; - case 60: - frequency = 5300; - break; - case 64: - frequency = 5320; - break; - case 100: - frequency = 5500; - break; - case 104: - frequency = 5520; - break; - case 108: - frequency = 5540; - break; - case 112: - frequency = 5560; - break; - case 116: - frequency = 5580; - break; - case 120: - frequency = 5600; - break; - case 124: - frequency = 5620; - break; - case 128: - frequency = 5640; - break; - case 132: - frequency = 5660; - break; - case 136: - frequency = 5680; - break; - case 140: - frequency = 5700; - break; - case 149: - frequency = 5745; - break; - case 153: - frequency = 5765; - break; - case 157: - frequency = 5785; - break; - case 161: - frequency = 5805; - break; - case 165: - frequency = 5825; - break; - } - - return frequency; -} - -double ConnectivityUtils::ConvertFrequenceToFloat(const iw_freq * in) -{ - double result = (double) in->m; - - for (int i = 0; i < in->e; i++) - result *= 10; - - return result; -} - -CHIP_ERROR ConnectivityUtils::GetWiFiParameter(int skfd, /* Socket to the kernel */ - const char * ifname, /* Device name */ - int request, /* WE ID */ - struct iwreq * pwrq) /* Fixed part of the request */ -{ - Platform::CopyString(pwrq->ifr_name, ifname); - - if (ioctl(skfd, request, pwrq) < 0) - return CHIP_ERROR_BAD_REQUEST; - - return CHIP_NO_ERROR; -} - -CHIP_ERROR ConnectivityUtils::GetWiFiStats(int skfd, const char * ifname, struct iw_statistics * stats) -{ - struct iwreq wrq; - - wrq.u.data.pointer = (caddr_t) stats; - wrq.u.data.length = sizeof(struct iw_statistics); - wrq.u.data.flags = 1; /*Clear updated flag */ - Platform::CopyString(wrq.ifr_name, ifname); - - return GetWiFiParameter(skfd, ifname, SIOCGIWSTATS, &wrq); -} - +} // namespace ConnectivityUtils } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/ConnectivityUtils.h b/src/platform/Tizen/ConnectivityUtils.h index a292b5f2ae682a..7561c080b5de9a 100644 --- a/src/platform/Tizen/ConnectivityUtils.h +++ b/src/platform/Tizen/ConnectivityUtils.h @@ -38,31 +38,22 @@ namespace Internal { static constexpr uint16_t kWiFi_BAND_2_4_GHZ = 2400; static constexpr uint16_t kWiFi_BAND_5_0_GHZ = 5000; -class ConnectivityUtils -{ -public: - static uint16_t MapChannelToFrequency(const uint16_t inBand, const uint8_t inChannel); - static uint8_t MapFrequencyToChannel(const uint16_t frequency); - static app::Clusters::GeneralDiagnostics::InterfaceTypeEnum GetInterfaceConnectionType(const char * ifname); - static CHIP_ERROR GetInterfaceHardwareAddrs(const char * ifname, uint8_t * buf, size_t bufSize); - static CHIP_ERROR GetInterfaceIPv4Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp); - static CHIP_ERROR GetInterfaceIPv6Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp); - static CHIP_ERROR GetWiFiInterfaceName(char * ifname, size_t bufSize); - static CHIP_ERROR GetWiFiChannelNumber(const char * ifname, uint16_t & channelNumber); - static CHIP_ERROR GetWiFiRssi(const char * ifname, int8_t & rssi); - static CHIP_ERROR GetWiFiBeaconLostCount(const char * ifname, uint32_t & beaconLostCount); - static CHIP_ERROR GetWiFiCurrentMaxRate(const char * ifname, uint64_t & currentMaxRate); - static CHIP_ERROR GetEthInterfaceName(char * ifname, size_t bufSize); - static CHIP_ERROR GetEthPHYRate(const char * ifname, app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum & pHYRate); - static CHIP_ERROR GetEthFullDuplex(const char * ifname, bool & fullDuplex); - -private: - static uint16_t Map2400MHz(const uint8_t inChannel); - static uint16_t Map5000MHz(const uint8_t inChannel); - static double ConvertFrequenceToFloat(const iw_freq * in); - static CHIP_ERROR GetWiFiParameter(int skfd, const char * ifname, int request, struct iwreq * pwrq); - static CHIP_ERROR GetWiFiStats(int skfd, const char * ifname, struct iw_statistics * stats); -}; +namespace ConnectivityUtils { + +app::Clusters::GeneralDiagnostics::InterfaceTypeEnum GetInterfaceConnectionType(const char * ifname); +CHIP_ERROR GetInterfaceHardwareAddrs(const char * ifname, uint8_t * buf, size_t bufSize); +CHIP_ERROR GetInterfaceIPv4Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp); +CHIP_ERROR GetInterfaceIPv6Addrs(const char * ifname, uint8_t & size, NetworkInterface * ifp); +CHIP_ERROR GetWiFiInterfaceName(char * ifname, size_t bufSize); +CHIP_ERROR GetWiFiChannelNumber(const char * ifname, uint16_t & channelNumber); +CHIP_ERROR GetWiFiRssi(const char * ifname, int8_t & rssi); +CHIP_ERROR GetWiFiBeaconLostCount(const char * ifname, uint32_t & beaconLostCount); +CHIP_ERROR GetWiFiCurrentMaxRate(const char * ifname, uint64_t & currentMaxRate); +CHIP_ERROR GetEthInterfaceName(char * ifname, size_t bufSize); +CHIP_ERROR GetEthPHYRate(const char * ifname, app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum & pHYRate); +CHIP_ERROR GetEthFullDuplex(const char * ifname, bool & fullDuplex); + +} // namespace ConnectivityUtils } // namespace Internal } // namespace DeviceLayer diff --git a/src/platform/Tizen/DiagnosticDataProviderImpl.cpp b/src/platform/Tizen/DiagnosticDataProviderImpl.cpp index 28d1f02cfd40d1..b8c48f101a1b7e 100644 --- a/src/platform/Tizen/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Tizen/DiagnosticDataProviderImpl.cpp @@ -28,9 +28,11 @@ #include #include +#include #include #include #include +#include using namespace ::chip::app; using namespace ::chip::DeviceLayer::Internal; @@ -63,8 +65,8 @@ CHIP_ERROR GetEthernetStatsCount(EthernetStatsCountType type, uint64_t & count) if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; @@ -72,7 +74,7 @@ CHIP_ERROR GetEthernetStatsCount(EthernetStatsCountType type, uint64_t & count) { if (ConnectivityUtils::GetInterfaceConnectionType(ifa->ifa_name) == InterfaceTypeEnum::kEthernet) { - ChipLogProgress(DeviceLayer, "Found the primary Ethernet interface:%s", StringOrNullMarker(ifa->ifa_name)); + ChipLogProgress(DeviceLayer, "Found the primary Ethernet interface: %s", StringOrNullMarker(ifa->ifa_name)); break; } } @@ -123,8 +125,8 @@ CHIP_ERROR GetWiFiStatsCount(WiFiStatsCountType type, uint64_t & count) if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; @@ -290,8 +292,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } NetworkInterface * head = nullptr; @@ -341,11 +343,13 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** } } - *netifpp = head; - err = CHIP_NO_ERROR; + if (head != nullptr) + { + *netifpp = head; + err = CHIP_NO_ERROR; + } freeifaddrs(ifaddr); - return err; } @@ -451,8 +455,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetEthNetworkDiagnosticsCounts() if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; @@ -619,8 +623,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() if (getifaddrs(&ifaddr) == -1) { - ChipLogError(DeviceLayer, "Failed to get network interfaces"); - return err; + ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno)); + return CHIP_ERROR_POSIX(errno); } struct ifaddrs * ifa = nullptr; diff --git a/src/platform/Tizen/DnssdImpl.cpp b/src/platform/Tizen/DnssdImpl.cpp index 9d232cbbb82ef6..8d383ac48f5d13 100644 --- a/src/platform/Tizen/DnssdImpl.cpp +++ b/src/platform/Tizen/DnssdImpl.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -29,10 +30,9 @@ #include #include #include -#include -#include #include +#include #include #include #include @@ -41,10 +41,14 @@ #include #include +#include "ErrorUtils.h" + #if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include #endif +using chip::DeviceLayer::Internal::TizenToChipError; + namespace { constexpr uint8_t kDnssdKeyMaxSize = 32; @@ -75,21 +79,6 @@ std::string GetFullType(const char * type, chip::Dnssd::DnssdServiceProtocol pro return typeBuilder.str(); } -CHIP_ERROR GetChipError(int dnssdError) -{ - switch (dnssdError) - { - case DNSSD_ERROR_NONE: - return CHIP_NO_ERROR; - case DNSSD_ERROR_NAME_CONFLICT: - return CHIP_ERROR_MDNS_COLLISION; - case DNSSD_ERROR_OUT_OF_MEMORY: - return CHIP_ERROR_NO_MEMORY; - default: - return CHIP_ERROR_INTERNAL; - } -} - void OnRegister(dnssd_error_e result, dnssd_service_h service, void * data) { auto rCtx = reinterpret_cast(data); @@ -99,8 +88,8 @@ void OnRegister(dnssd_error_e result, dnssd_service_h service, void * data) if (result != DNSSD_ERROR_NONE) { - ChipLogError(DeviceLayer, "DNSsd %s: Error: %d", __func__, result); - rCtx->mCallback(rCtx->mCbContext, nullptr, nullptr, GetChipError(result)); + ChipLogError(DeviceLayer, "DNSsd %s: Error: %s", __func__, get_error_message(result)); + rCtx->mCallback(rCtx->mCbContext, nullptr, nullptr, TizenToChipError(result)); // After this point, the context might be no longer valid rCtx->mInstance->RemoveContext(rCtx); return; @@ -114,8 +103,8 @@ CHIP_ERROR RegisterAsync(chip::Dnssd::RegisterContext * rCtx) ChipLogDetail(DeviceLayer, "DNSsd %s", __func__); int ret = dnssd_register_local_service(rCtx->mServiceHandle, OnRegister, rCtx); - VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, GetChipError(ret), - ChipLogError(DeviceLayer, "dnssd_register_local_service() failed. ret: %d", ret)); + VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, TizenToChipError(ret), + ChipLogError(DeviceLayer, "dnssd_register_local_service() failed: %s", get_error_message(ret))); rCtx->mIsRegistered = true; return CHIP_NO_ERROR; @@ -193,16 +182,17 @@ void OnBrowse(dnssd_service_state_e state, dnssd_service_h service, void * data) uint32_t interfaceId = 0; ret = dnssd_service_get_type(service, &MakeUniquePointerReceiver(type).Get()); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_type() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_type() failed: %s", get_error_message(ret))); ret = dnssd_service_get_name(service, &MakeUniquePointerReceiver(name).Get()); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_name() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_name() failed: %s", get_error_message(ret))); ret = dnssd_service_get_interface(service, &MakeUniquePointerReceiver(ifaceName).Get()); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_interface() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_service_get_interface() failed: %s", get_error_message(ret))); interfaceId = if_nametoindex(ifaceName.get()); - VerifyOrExit(interfaceId > 0, ChipLogError(DeviceLayer, "if_nametoindex() failed. errno: %d", errno); + VerifyOrExit(interfaceId > 0, ChipLogError(DeviceLayer, "if_nametoindex() failed: %s", strerror(errno)); ret = DNSSD_ERROR_OPERATION_FAILED); if (state == DNSSD_SERVICE_STATE_AVAILABLE) @@ -220,7 +210,7 @@ void OnBrowse(dnssd_service_state_e state, dnssd_service_h service, void * data) if (ret != DNSSD_ERROR_NONE) { - bCtx->mCallback(bCtx->mCbContext, nullptr, 0, true, GetChipError(ret)); + bCtx->mCallback(bCtx->mCbContext, nullptr, 0, true, TizenToChipError(ret)); // After this point the context might be no longer valid bCtx->mInstance->RemoveContext(bCtx); } @@ -240,13 +230,13 @@ CHIP_ERROR BrowseAsync(chip::Dnssd::BrowseContext * bCtx) else { char iface[IF_NAMESIZE + 1] = ""; - VerifyOrReturnValue(if_indextoname(interfaceId, iface) != nullptr, CHIP_ERROR_INTERNAL, - ChipLogError(DeviceLayer, "if_indextoname() failed. errno: %d", errno)); + VerifyOrReturnValue(if_indextoname(interfaceId, iface) != nullptr, CHIP_ERROR_POSIX(errno), + ChipLogError(DeviceLayer, "if_indextoname() failed: %s", strerror(errno))); ret = dnssd_browse_service(bCtx->mType, iface, &bCtx->mBrowserHandle, OnBrowse, bCtx); } - VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, GetChipError(ret), - ChipLogError(DeviceLayer, "dnssd_browse_service() failed. ret: %d", ret)); + VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, TizenToChipError(ret), + ChipLogError(DeviceLayer, "dnssd_browse_service() failed: %s", get_error_message(ret))); bCtx->mIsBrowsing = true; return CHIP_NO_ERROR; @@ -316,12 +306,12 @@ void OnResolve(dnssd_error_e result, dnssd_service_h service, void * userData) CHIP_ERROR err = CHIP_NO_ERROR; int ret = dnssd_service_get_name(service, &MakeUniquePointerReceiver(name).Get()); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_name() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_name() failed: %s", get_error_message(ret))); chip::Platform::CopyString(rCtx->mResult.mName, name.get()); ret = dnssd_service_get_ip(service, &MakeUniquePointerReceiver(ipv4).Get(), &MakeUniquePointerReceiver(ipv6).Get()); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_ip() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_ip() failed: %s", get_error_message(ret))); // If both IPv4 and IPv6 are set, IPv6 address has higher priority. if (ipv6.get() != nullptr && strcmp(ipv6.get(), kEmptyAddressIpv6) != 0) @@ -341,26 +331,28 @@ void OnResolve(dnssd_error_e result, dnssd_service_h service, void * userData) } #endif - ChipLogDetail(DeviceLayer, "DNSsd %s: IPv4: %s, IPv6: %s, ret: %d", __func__, StringOrNullMarker(ipv4.get()), - StringOrNullMarker(ipv6.get()), ret); - - VerifyOrExit(ret == DNSSD_ERROR_NONE, ); + ChipLogDetail(DeviceLayer, "DNSsd %s: IPv4: %s, IPv6: %s", __func__, StringOrNullMarker(ipv4.get()), + StringOrNullMarker(ipv6.get())); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "chip::Inet::IPAddress::FromString() failed: %s", get_error_message(ret))); ret = dnssd_service_get_port(service, &port); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_port() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_port() failed: %s", get_error_message(ret))); rCtx->mResult.mPort = static_cast(port); ret = dnssd_service_get_interface(service, &interface); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_interface() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_service_get_interface() failed: %s", get_error_message(ret))); err = chip::Inet::InterfaceId::InterfaceNameToId(interface, rCtx->mResult.mInterface); VerifyOrExit( err == CHIP_NO_ERROR, - ChipLogError(DeviceLayer, "chip::Inet::InterfaceId::InterfaceNameToId() failed. ret: %" CHIP_ERROR_FORMAT, err.Format())); + ChipLogError(DeviceLayer, "chip::Inet::InterfaceId::InterfaceNameToId() failed: %" CHIP_ERROR_FORMAT, err.Format())); ret = dnssd_service_get_all_txt_record(service, &rCtx->mResultTxtRecordLen, reinterpret_cast(&rCtx->mResultTxtRecord)); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_all_txt_record() failed. ret: %d", ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_service_get_all_txt_record() failed: %s", get_error_message(ret))); rCtx->mResult.mAddress.SetValue(ipAddr); @@ -379,7 +371,7 @@ void OnResolve(dnssd_error_e result, dnssd_service_h service, void * userData) return; exit: - rCtx->Finalize(ret != DNSSD_ERROR_NONE ? GetChipError(ret) : err); + rCtx->Finalize(ret != DNSSD_ERROR_NONE ? TizenToChipError(ret) : err); rCtx->mInstance->RemoveContext(rCtx); } @@ -388,8 +380,8 @@ CHIP_ERROR ResolveAsync(chip::Dnssd::ResolveContext * rCtx) ChipLogDetail(DeviceLayer, "DNSsd %s", __func__); int ret = dnssd_resolve_service(rCtx->mServiceHandle, OnResolve, rCtx); - VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, GetChipError(ret), - ChipLogError(DeviceLayer, "dnssd_resolve_service() failed. ret: %d", ret)); + VerifyOrReturnValue(ret == DNSSD_ERROR_NONE, TizenToChipError(ret), + ChipLogError(DeviceLayer, "dnssd_resolve_service() failed: %s", get_error_message(ret))); rCtx->mIsResolving = true; return CHIP_NO_ERROR; @@ -497,7 +489,7 @@ void DnssdTizen::Shutdown() { int ret = dnssd_deinitialize(); if (ret != DNSSD_ERROR_NONE) - ChipLogError(DeviceLayer, "DNSsd %s: Error: %d", __func__, ret); + ChipLogError(DeviceLayer, "dnssd_deinitialize() failed: %s", get_error_message(ret)); } CHIP_ERROR DnssdTizen::RegisterService(const DnssdService & service, DnssdPublishCallback callback, void * context) @@ -531,8 +523,8 @@ CHIP_ERROR DnssdTizen::RegisterService(const DnssdService & service, DnssdPublis int ret = dnssd_service_add_txt_record(serviceHandle, entry.mKey, dataSize, entry.mData); if (ret != DNSSD_ERROR_NONE) { - ChipLogError(DeviceLayer, "dnssd_service_add_txt_record() failed. ret: %d", ret); - callback(context, nullptr, nullptr, err = GetChipError(ret)); + ChipLogError(DeviceLayer, "dnssd_service_add_txt_record() failed: %s", get_error_message(ret)); + callback(context, nullptr, nullptr, err = TizenToChipError(ret)); } } @@ -545,26 +537,28 @@ CHIP_ERROR DnssdTizen::RegisterService(const DnssdService & service, DnssdPublis // Local service will be freed by the RegisterContext destructor int ret = dnssd_create_local_service(fullType.c_str(), &serviceCtx->mServiceHandle); auto serviceHandle = serviceCtx->mServiceHandle; - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_create_local_service() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_create_local_service() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); ret = dnssd_service_set_name(serviceHandle, service.mName); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_set_name() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_set_name() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); ret = dnssd_service_set_port(serviceHandle, service.mPort); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_set_port() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_set_port() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); if (interfaceId > 0) { char iface[IF_NAMESIZE + 1] = ""; VerifyOrExit(if_indextoname(interfaceId, iface) != nullptr, - ChipLogError(DeviceLayer, "if_indextoname() failed. errno: %d", errno); - err = CHIP_ERROR_INTERNAL); + ChipLogError(DeviceLayer, "if_indextoname() failed: %s", strerror(errno)); + err = CHIP_ERROR_POSIX(errno)); ret = dnssd_service_set_interface(serviceHandle, iface); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_set_interface() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_service_set_interface() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); } for (size_t i = 0; i < service.mTextEntrySize; ++i) @@ -572,8 +566,9 @@ CHIP_ERROR DnssdTizen::RegisterService(const DnssdService & service, DnssdPublis TextEntry entry = service.mTextEntries[i]; VerifyOrReturnError(chip::CanCastTo(entry.mDataSize), CHIP_ERROR_INVALID_ARGUMENT); ret = dnssd_service_add_txt_record(serviceHandle, entry.mKey, static_cast(entry.mDataSize), entry.mData); - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_add_txt_record() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_service_add_txt_record() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); } err = DeviceLayer::PlatformMgrImpl().GLibMatterContextInvokeSync(RegisterAsync, serviceCtx); @@ -648,13 +643,14 @@ CHIP_ERROR DnssdTizen::Resolve(const DnssdService & browseResult, chip::Inet::In { char iface[IF_NAMESIZE + 1] = ""; VerifyOrExit(if_indextoname(interfaceId, iface) != nullptr, - ChipLogError(DeviceLayer, "if_indextoname() failed. errno: %d", errno); - err = CHIP_ERROR_INTERNAL); + ChipLogError(DeviceLayer, "if_indextoname() failed: %s", strerror(errno)); + err = CHIP_ERROR_POSIX(errno)); ret = dnssd_create_remote_service(fullType.c_str(), browseResult.mName, iface, &resolveCtx->mServiceHandle); } - VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_create_remote_service() failed. ret: %d", ret); - err = GetChipError(ret)); + VerifyOrExit(ret == DNSSD_ERROR_NONE, + ChipLogError(DeviceLayer, "dnssd_create_remote_service() failed: %s", get_error_message(ret)); + err = TizenToChipError(ret)); err = DeviceLayer::PlatformMgrImpl().GLibMatterContextInvokeSync(ResolveAsync, resolveCtx); SuccessOrExit(err); diff --git a/src/platform/Tizen/ErrorUtils.cpp b/src/platform/Tizen/ErrorUtils.cpp new file mode 100644 index 00000000000000..9238db79fec240 --- /dev/null +++ b/src/platform/Tizen/ErrorUtils.cpp @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ErrorUtils.h" + +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +CHIP_ERROR TizenToChipError(int tizenError) +{ + switch (tizenError) + { + case TIZEN_ERROR_NONE: + return CHIP_NO_ERROR; + case TIZEN_ERROR_OUT_OF_MEMORY: + return CHIP_NO_ERROR; + default: + return CHIP_ERROR_INTERNAL; + + // Tizen DNSSD API errors + case DNSSD_ERROR_NAME_CONFLICT: + return CHIP_ERROR_MDNS_COLLISION; + + // Tizen Preference API errors + case PREFERENCE_ERROR_NO_KEY: + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/ErrorUtils.h b/src/platform/Tizen/ErrorUtils.h new file mode 100644 index 00000000000000..d6543d2b577e48 --- /dev/null +++ b/src/platform/Tizen/ErrorUtils.h @@ -0,0 +1,30 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +CHIP_ERROR TizenToChipError(int tizenError); + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/Logging.cpp b/src/platform/Tizen/Logging.cpp index 7473dcec8e0b7b..a228c8ef2b61c5 100644 --- a/src/platform/Tizen/Logging.cpp +++ b/src/platform/Tizen/Logging.cpp @@ -34,10 +34,9 @@ namespace Platform { */ void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) { - static constexpr char kLogTag[] = "CHIP"; - char msgBuf[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE] = { - 0, - }; + static constexpr char kLogTag[] = "CHIP"; + + char msgBuf[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; vsnprintf(msgBuf, sizeof(msgBuf), msg, v); switch (category) diff --git a/src/platform/Tizen/SystemInfo.cpp b/src/platform/Tizen/SystemInfo.cpp index 7fec28c129ef3f..e9ac7d7b1b1675 100644 --- a/src/platform/Tizen/SystemInfo.cpp +++ b/src/platform/Tizen/SystemInfo.cpp @@ -24,6 +24,8 @@ #include +#include "ErrorUtils.h" + using namespace std; namespace chip { @@ -47,8 +49,8 @@ CHIP_ERROR SystemInfo::GetPlatformVersion(PlatformVersion & version) ret = system_info_get_platform_string("http://tizen.org/feature/platform.version", &platformVersion); if (ret != SYSTEM_INFO_ERROR_NONE) { - ChipLogError(DeviceLayer, "system_info_get_platform_string() failed. %s", get_error_message(ret)); - return CHIP_ERROR_INTERNAL; + ChipLogError(DeviceLayer, "system_info_get_platform_string() failed: %s", get_error_message(ret)); + return TizenToChipError(ret); } sInstance.mMajor = version.mMajor = (uint8_t) (platformVersion[0] - '0'); diff --git a/src/platform/Tizen/WiFiManager.cpp b/src/platform/Tizen/WiFiManager.cpp index bd0907f5531ab2..ed43377e5e0142 100644 --- a/src/platform/Tizen/WiFiManager.cpp +++ b/src/platform/Tizen/WiFiManager.cpp @@ -36,7 +36,8 @@ using namespace ::chip::DeviceLayer::NetworkCommissioning; namespace { -static constexpr const char * __WiFiDeviceStateToStr(wifi_manager_device_state_e state) + +constexpr const char * __WiFiDeviceStateToStr(wifi_manager_device_state_e state) { switch (state) { @@ -49,7 +50,7 @@ static constexpr const char * __WiFiDeviceStateToStr(wifi_manager_device_state_e } } -static constexpr const char * __WiFiScanStateToStr(wifi_manager_scan_state_e state) +constexpr const char * __WiFiScanStateToStr(wifi_manager_scan_state_e state) { switch (state) { @@ -62,7 +63,7 @@ static constexpr const char * __WiFiScanStateToStr(wifi_manager_scan_state_e sta } } -static constexpr const char * __WiFiConnectionStateToStr(wifi_manager_connection_state_e state) +constexpr const char * __WiFiConnectionStateToStr(wifi_manager_connection_state_e state) { switch (state) { @@ -81,7 +82,7 @@ static constexpr const char * __WiFiConnectionStateToStr(wifi_manager_connection } } -static constexpr const char * __WiFiIPConflictStateToStr(wifi_manager_ip_conflict_state_e state) +constexpr const char * __WiFiIPConflictStateToStr(wifi_manager_ip_conflict_state_e state) { switch (state) { @@ -94,7 +95,7 @@ static constexpr const char * __WiFiIPConflictStateToStr(wifi_manager_ip_conflic } } -static constexpr const char * __WiFiModuleStateToStr(wifi_manager_module_state_e state) +constexpr const char * __WiFiModuleStateToStr(wifi_manager_module_state_e state) { switch (state) { @@ -107,7 +108,7 @@ static constexpr const char * __WiFiModuleStateToStr(wifi_manager_module_state_e } } -static constexpr const char * __WiFiSecurityTypeToStr(wifi_manager_security_type_e type) +constexpr const char * __WiFiSecurityTypeToStr(wifi_manager_security_type_e type) { switch (type) { @@ -136,7 +137,7 @@ static constexpr const char * __WiFiSecurityTypeToStr(wifi_manager_security_type // wifi_manager's scan results don't contains the channel infomation, so we need this lookup table for resolving the band and // channel infomation. -std::pair _GetBandAndChannelFromFrequency(int freq) +constexpr std::pair _GetBandAndChannelFromFrequency(int freq) { std::pair ret = std::make_pair(WiFiBand::k2g4, 0); if (freq <= 931) @@ -229,7 +230,7 @@ std::pair _GetBandAndChannelFromFrequency(int freq) return ret; } -uint8_t _GetNetworkSecurityType(wifi_manager_security_type_e type) +constexpr uint8_t _GetNetworkSecurityType(wifi_manager_security_type_e type) { switch (type) { @@ -255,6 +256,7 @@ uint8_t _GetNetworkSecurityType(wifi_manager_security_type_e type) return 0x0; } } + } // namespace namespace chip { From c7383a047a61065d6a0bb0f8396bf26563a014e4 Mon Sep 17 00:00:00 2001 From: Lazar Kovacic Date: Fri, 26 Jan 2024 03:39:22 +0100 Subject: [PATCH 40/45] TV Matter Media: Updated existing cluster to resolve the issue #31320 (#31676) * Update XML & Zap file per reported issues * Run ZAP tool * apply manual patch --- .../all-clusters-minimal-app.matter | 21 +++++----- ...ootnode_basicvideoplayer_0ff86e943b.matter | 19 +++++---- .../placeholder/linux/apps/app1/config.matter | 42 ++++++++++--------- .../placeholder/linux/apps/app2/config.matter | 42 ++++++++++--------- examples/tv-app/tv-common/tv-app.matter | 31 +++++++------- examples/tv-app/tv-common/tv-app.zap | 4 +- .../tv-casting-common/tv-casting-app.matter | 27 ++++++------ .../data-model/chip/account-login-cluster.xml | 1 + .../zcl/data-model/chip/channel-cluster.xml | 8 ++-- .../chip/content-control-cluster.xml | 6 +-- .../chip/media-playback-cluster.xml | 7 ++-- .../chip/target-navigator-cluster.xml | 1 + .../data_model/controller-clusters.matter | 27 ++++++------ .../python/chip/clusters/Objects.py | 21 +++++----- .../CHIP/zap-generated/MTRBaseClusters.h | 19 +++++---- .../zap-generated/cluster-enums-check.h | 3 +- .../app-common/zap-generated/cluster-enums.h | 21 +++++----- 17 files changed, 159 insertions(+), 141 deletions(-) diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 17689ab421469c..fa161d6009bf01 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -4467,12 +4467,13 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -4488,14 +4489,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -4641,7 +4642,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -4685,7 +4686,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -4727,9 +4728,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -5332,7 +5333,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 9157827f8f1311..56d1fc88e7b9f4 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1230,12 +1230,13 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -1251,14 +1252,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -1404,7 +1405,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -1448,7 +1449,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -1490,9 +1491,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 23fa4be8cf3c1e..4498e3bcd4ad8b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6338,12 +6338,13 @@ cluster OccupancySensing = 1030 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -6359,14 +6360,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -6512,12 +6513,13 @@ cluster Channel = 1284 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -6533,14 +6535,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -6686,7 +6688,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -6730,7 +6732,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -6774,7 +6776,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -6816,9 +6818,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -6932,7 +6934,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -6974,9 +6976,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -8053,7 +8055,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; @@ -8094,7 +8096,7 @@ cluster AccountLogin = 1294 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 371408903fa89a..64a2bd3ddf598c 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6295,12 +6295,13 @@ cluster OccupancySensing = 1030 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -6316,14 +6317,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -6469,12 +6470,13 @@ cluster Channel = 1284 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -6490,14 +6492,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -6643,7 +6645,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -6687,7 +6689,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -6731,7 +6733,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -6773,9 +6775,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -6889,7 +6891,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -6931,9 +6933,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -8010,7 +8012,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; @@ -8051,7 +8053,7 @@ cluster AccountLogin = 1294 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 3f0d6b09e1f33b..2cff19f2c3193d 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2039,12 +2039,13 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -2060,14 +2061,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -2213,7 +2214,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -2257,7 +2258,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -2299,9 +2300,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -2904,7 +2905,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; @@ -2950,9 +2951,9 @@ cluster ContentControl = 1295 { bitmap Feature : bitmap32 { kScreenTime = 0x1; kPINManagement = 0x2; - kBlockUnrated = 0x3; - kOnDemandContentRating = 0x4; - kScheduledContentRating = 0x5; + kBlockUnrated = 0x4; + kOnDemandContentRating = 0x8; + kScheduledContentRating = 0x10; } struct RatingNameStruct { @@ -3578,7 +3579,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 28; ram attribute clusterRevision default = 1; handle command UpdatePIN; @@ -3809,7 +3810,7 @@ endpoint 3 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 28; ram attribute clusterRevision default = 1; handle command UpdatePIN; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index c6cde12f5eac5e..884246374269a9 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -6263,7 +6263,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "28", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8707,7 +8707,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "28", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index d6d5b3f023d6ef..b1ee46b40cfb19 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1501,12 +1501,13 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -1522,14 +1523,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -1675,7 +1676,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -1719,7 +1720,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -1761,9 +1762,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -2366,7 +2367,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; @@ -2412,9 +2413,9 @@ cluster ContentControl = 1295 { bitmap Feature : bitmap32 { kScreenTime = 0x1; kPINManagement = 0x2; - kBlockUnrated = 0x3; - kOnDemandContentRating = 0x4; - kScheduledContentRating = 0x5; + kBlockUnrated = 0x4; + kOnDemandContentRating = 0x8; + kScheduledContentRating = 0x10; } struct RatingNameStruct { diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index 273533c5fa82a1..baf74dc3c2e1da 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. ACCOUNT_LOGIN_CLUSTER true true + This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. diff --git a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index c5731ef9cd3a5f..460fedd40c89c1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. CHANNEL_CLUSTER true true + This cluster provides an interface for controlling the current Channel on a device. ChannelList Lineup @@ -181,21 +182,22 @@ limitations under the License. + - + - - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml index 6dcf825c364c03..1c1ba4502eda7a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml @@ -100,9 +100,9 @@ limitations under the License. - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index 76c80819b279c2..32c2da12ed0780 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. MEDIA_PLAYBACK_CLUSTER true true + This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. @@ -164,9 +165,9 @@ limitations under the License. - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index 388770512ee27c..bc665905df1eb2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. TARGET_NAVIGATOR_CLUSTER true true + This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. TargetList CurrentTarget diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 053b7fb99f969b..a822e2fde612fa 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -7429,12 +7429,13 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for controlling the current Channel on a device. */ cluster Channel = 1284 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum ChannelTypeEnum : enum8 { kSatellite = 0; kCable = 1; kTerrestrial = 2; + kOTT = 3; } enum LineupInfoTypeEnum : enum8 { @@ -7450,14 +7451,14 @@ cluster Channel = 1284 { bitmap Feature : bitmap32 { kChannelList = 0x1; kLineupInfo = 0x2; - kElectronicGuide = 0x3; - kRecordProgram = 0x4; + kElectronicGuide = 0x4; + kRecordProgram = 0x8; } bitmap RecordingFlagBitmap : bitmap32 { kScheduled = 0x1; kRecordSeries = 0x2; - kRecorded = 0x3; + kRecorded = 0x4; } struct ProgramCastStruct { @@ -7603,7 +7604,7 @@ cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ cluster TargetNavigator = 1285 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum StatusEnum : enum8 { kSuccess = 0; @@ -7647,7 +7648,7 @@ cluster TargetNavigator = 1285 { /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ cluster MediaPlayback = 1286 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -7689,9 +7690,9 @@ cluster MediaPlayback = 1286 { bitmap Feature : bitmap32 { kAdvancedSeek = 0x1; kVariableSpeed = 0x2; - kTextTracks = 0x3; - kAudioTracks = 0x4; - kAudioAdvance = 0x5; + kTextTracks = 0x4; + kAudioTracks = 0x8; + kAudioAdvance = 0x10; } struct TrackAttributesStruct { @@ -8294,7 +8295,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ cluster AccountLogin = 1294 { - revision 1; // NOTE: Default/not specifically set + revision 2; critical event LoggedOut = 0 { optional node_id node = 0; @@ -8340,9 +8341,9 @@ cluster ContentControl = 1295 { bitmap Feature : bitmap32 { kScreenTime = 0x1; kPINManagement = 0x2; - kBlockUnrated = 0x3; - kOnDemandContentRating = 0x4; - kScheduledContentRating = 0x5; + kBlockUnrated = 0x4; + kOnDemandContentRating = 0x8; + kScheduledContentRating = 0x10; } struct RatingNameStruct { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 1c184fe18f8dc9..1eca5fdaacf105 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -39287,11 +39287,12 @@ class ChannelTypeEnum(MatterIntEnum): kSatellite = 0x00 kCable = 0x01 kTerrestrial = 0x02 + kOtt = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 4, class LineupInfoTypeEnum(MatterIntEnum): kMso = 0x00 @@ -39315,13 +39316,13 @@ class Bitmaps: class Feature(IntFlag): kChannelList = 0x1 kLineupInfo = 0x2 - kElectronicGuide = 0x3 - kRecordProgram = 0x4 + kElectronicGuide = 0x4 + kRecordProgram = 0x8 class RecordingFlagBitmap(IntFlag): kScheduled = 0x1 kRecordSeries = 0x2 - kRecorded = 0x3 + kRecorded = 0x4 class Structs: @dataclass @@ -40138,9 +40139,9 @@ class Bitmaps: class Feature(IntFlag): kAdvancedSeek = 0x1 kVariableSpeed = 0x2 - kTextTracks = 0x3 - kAudioTracks = 0x4 - kAudioAdvance = 0x5 + kTextTracks = 0x4 + kAudioTracks = 0x8 + kAudioAdvance = 0x10 class Structs: @dataclass @@ -42850,9 +42851,9 @@ class Bitmaps: class Feature(IntFlag): kScreenTime = 0x1 kPINManagement = 0x2 - kBlockUnrated = 0x3 - kOnDemandContentRating = 0x4 - kScheduledContentRating = 0x5 + kBlockUnrated = 0x4 + kOnDemandContentRating = 0x8 + kScheduledContentRating = 0x10 class Structs: @dataclass diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index b8a7e10242e7b3..d696bb1b611d10 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -19102,6 +19102,7 @@ typedef NS_ENUM(uint8_t, MTRChannelType) { MTRChannelTypeSatellite MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRChannelTypeCable MTR_PROVISIONALLY_AVAILABLE = 0x01, MTRChannelTypeTerrestrial MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRChannelTypeOTT MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRChannelLineupInfoType) { @@ -19118,14 +19119,14 @@ typedef NS_ENUM(uint8_t, MTRChannelStatus) { typedef NS_OPTIONS(uint32_t, MTRChannelFeature) { MTRChannelFeatureChannelList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRChannelFeatureLineupInfo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRChannelFeatureElectronicGuide MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRChannelFeatureElectronicGuide MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRChannelRecordingFlagBitmap) { MTRChannelRecordingFlagBitmapScheduled MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRChannelRecordingFlagBitmapRecordSeries MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRTargetNavigatorStatus) { @@ -19174,9 +19175,9 @@ typedef NS_ENUM(uint8_t, MTRMediaPlaybackStatus) { typedef NS_OPTIONS(uint32_t, MTRMediaPlaybackFeature) { MTRMediaPlaybackFeatureAdvancedSeek MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, MTRMediaPlaybackFeatureVariableSpeed MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, - MTRMediaPlaybackFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRMediaPlaybackFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRMediaPlaybackFeatureAudioAdvance MTR_PROVISIONALLY_AVAILABLE = 0x5, + MTRMediaPlaybackFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRMediaPlaybackFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRMediaPlaybackFeatureAudioAdvance MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); typedef NS_ENUM(uint8_t, MTRMediaInputInputType) { @@ -19507,9 +19508,9 @@ typedef NS_ENUM(uint8_t, MTRApplicationBasicApplicationStatus) { typedef NS_OPTIONS(uint32_t, MTRContentControlFeature) { MTRContentControlFeatureScreenTime MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRContentControlFeaturePINManagement MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRContentControlFeatureBlockUnrated MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRContentControlFeatureOnDemandContentRating MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRContentControlFeatureScheduledContentRating MTR_PROVISIONALLY_AVAILABLE = 0x5, + MTRContentControlFeatureBlockUnrated MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentControlFeatureOnDemandContentRating MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRContentControlFeatureScheduledContentRating MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 97ea4eeb3ce0ac..9afff5f67ad63c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -3169,9 +3169,10 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::ChannelTypeEnu case EnumType::kSatellite: case EnumType::kCable: case EnumType::kTerrestrial: + case EnumType::kOtt: return val; default: - return static_cast(3); + return static_cast(4); } } static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::LineupInfoTypeEnum val) diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 6f75b0195e1cc3..a3ba215efcd0a1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -4615,11 +4615,12 @@ enum class ChannelTypeEnum : uint8_t kSatellite = 0x00, kCable = 0x01, kTerrestrial = 0x02, + kOtt = 0x03, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 4, }; // Enum for LineupInfoTypeEnum @@ -4651,8 +4652,8 @@ enum class Feature : uint32_t { kChannelList = 0x1, kLineupInfo = 0x2, - kElectronicGuide = 0x3, - kRecordProgram = 0x4, + kElectronicGuide = 0x4, + kRecordProgram = 0x8, }; // Bitmap for RecordingFlagBitmap @@ -4660,7 +4661,7 @@ enum class RecordingFlagBitmap : uint32_t { kScheduled = 0x1, kRecordSeries = 0x2, - kRecorded = 0x3, + kRecorded = 0x4, }; } // namespace Channel @@ -4745,9 +4746,9 @@ enum class Feature : uint32_t { kAdvancedSeek = 0x1, kVariableSpeed = 0x2, - kTextTracks = 0x3, - kAudioTracks = 0x4, - kAudioAdvance = 0x5, + kTextTracks = 0x4, + kAudioTracks = 0x8, + kAudioAdvance = 0x10, }; } // namespace MediaPlayback @@ -5080,9 +5081,9 @@ enum class Feature : uint32_t { kScreenTime = 0x1, kPINManagement = 0x2, - kBlockUnrated = 0x3, - kOnDemandContentRating = 0x4, - kScheduledContentRating = 0x5, + kBlockUnrated = 0x4, + kOnDemandContentRating = 0x8, + kScheduledContentRating = 0x10, }; } // namespace ContentControl From 0943f8ce41fe91146612eabe83211402155aaa54 Mon Sep 17 00:00:00 2001 From: liangpy4 <150026141+liangpy4@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:25:45 +0800 Subject: [PATCH 41/45] [Microwave Oven] Fix build error for Microwave Oven APP (#31619) * fix #31525 * Restyled by whitespace * Restyled by clang-format * update MWO sdk for checking watt setting * Restyled by clang-format * add static-cast * try fix darwin issue * Restyled by clang-format * update code after reviewed * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../microwave-oven-control-server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp index c1e9546b2afcb7..9d57d762bd36c4 100644 --- a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp +++ b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp @@ -317,9 +317,9 @@ void Instance::HandleSetCookingParameters(HandlerContext & ctx, const Commands:: VerifyOrExit( mSupportedWattLevels > 0, ChipLogError(Zcl, "Microwave Oven Control: Failed to set wattSettingIndex, count of supported watt levels is 0")); - - reqWattSettingIndex = wattSettingIndex.ValueOr(mSupportedWattLevels - 1); - VerifyOrExit(reqWattSettingIndex <= (mSupportedWattLevels - 1), status = Status::ConstraintError; + uint8_t maxWattSettingIndex = static_cast(mSupportedWattLevels - 1); + reqWattSettingIndex = wattSettingIndex.ValueOr(maxWattSettingIndex); + VerifyOrExit(reqWattSettingIndex <= maxWattSettingIndex, status = Status::ConstraintError; ChipLogError(Zcl, "Microwave Oven Control: Failed to set wattSettingIndex, wattSettingIndex is out of range")); status = mDelegate->HandleSetCookingParametersCallback(reqCookMode, reqCookTimeSec, reqStartAfterSetting, NullOptional, From a9edb724f98b4aea88e32eaa29589f038009c3b2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 25 Jan 2024 22:45:34 -0500 Subject: [PATCH 42/45] Allow attribute-storage to compile even if GENERATED_CLUSTERS is not defined. (#31693) This can happen in configurations without any fixed endpoints at all (all endpoints are dynamic). --- src/app/util/attribute-storage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index ea4c3cc0071b80..1faf74aeba6966 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -123,8 +123,10 @@ constexpr const chip::EventId generatedEvents[] = GENERATED_EVENTS; constexpr const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) +#ifdef GENERATED_CLUSTERS constexpr const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) +#endif constexpr const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; constexpr const EmberAfDeviceType fixedDeviceTypeList[] = FIXED_DEVICE_TYPES; From cc5ca440bd94971db2f1ed45246d219eb5de096f Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 25 Jan 2024 23:14:27 -0800 Subject: [PATCH 43/45] Use GetLocalMRPConfig for LivenessCheckTimerTimeout (#31466) * Use GetLocalMRPConfig for LivenessCheckTimerTimeout * address comment * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/app/ReadClient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 77a8e4c826ad6b..4a123fe01b6291 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -945,7 +945,9 @@ CHIP_ERROR ReadClient::ComputeLivenessCheckTimerTimeout(System::Clock::Timeout * // TODO: We need to find a good home for this logic that will correctly compute this based on transport. For now, this will // suffice since we don't use TCP as a transport currently and subscriptions over BLE aren't really a thing. // - const auto & ourMrpConfig = GetDefaultMRPConfig(); + const auto & localMRPConfig = GetLocalMRPConfig(); + const auto & defaultMRPConfig = GetDefaultMRPConfig(); + const auto & ourMrpConfig = localMRPConfig.ValueOr(defaultMRPConfig); auto publisherTransmissionTimeout = GetRetransmissionTimeout(ourMrpConfig.mActiveRetransTimeout, ourMrpConfig.mIdleRetransTimeout, System::SystemClock().GetMonotonicTimestamp(), ourMrpConfig.mActiveThresholdTime); From 4fa072b69b62aa84713dcb938e69d87afb62b4fb Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 26 Jan 2024 03:30:00 -0500 Subject: [PATCH 44/45] Flag FeatureMap in Descriptor as being implemented via AttributeAccessInterface. (#31698) * Flag FeatureMap in Descriptor as being implemented via AttributeAccessInterface. Because it is. * Auto-update ZAP files. * Regenerate generated code. --- .../air-purifier-app.matter | 10 +- .../air-purifier-common/air-purifier-app.zap | 20 +- .../air-quality-sensor-app.matter | 4 +- .../air-quality-sensor-app.zap | 8 +- .../all-clusters-app.matter | 8 +- .../all-clusters-common/all-clusters-app.zap | 1828 ++++++++--------- .../all-clusters-minimal-app.matter | 8 +- .../all-clusters-minimal-app.zap | 1306 ++++++------ .../bridge-common/bridge-app.matter | 6 +- .../bridge-app/bridge-common/bridge-app.zap | 12 +- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 4 +- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 8 +- .../rootnode_airpurifier_73a6fe2651.matter | 4 +- .../rootnode_airpurifier_73a6fe2651.zap | 8 +- ...umiditysensor_thermostat_56de3d5f45.matter | 12 +- ...r_humiditysensor_thermostat_56de3d5f45.zap | 24 +- ...ootnode_airqualitysensor_e63187f6c9.matter | 4 +- .../rootnode_airqualitysensor_e63187f6c9.zap | 8 +- ...ootnode_basicvideoplayer_0ff86e943b.matter | 4 +- .../rootnode_basicvideoplayer_0ff86e943b.zap | 8 +- ...de_colortemperaturelight_hbUnzYVeyn.matter | 4 +- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 8 +- .../rootnode_contactsensor_27f76aeaf5.matter | 4 +- .../rootnode_contactsensor_27f76aeaf5.zap | 8 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 4 +- .../rootnode_contactsensor_lFAGG1bfRO.zap | 8 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 4 +- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 8 +- .../rootnode_dishwasher_cc105034fe.matter | 4 +- .../rootnode_dishwasher_cc105034fe.zap | 8 +- .../rootnode_doorlock_aNKYAreMXE.matter | 4 +- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 8 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 4 +- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 8 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 4 +- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 8 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 4 +- .../rootnode_flowsensor_1zVxHedlaV.zap | 8 +- .../rootnode_genericswitch_9866e35d0b.matter | 4 +- .../rootnode_genericswitch_9866e35d0b.zap | 8 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 4 +- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 8 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 4 +- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 8 +- .../rootnode_laundrywasher_fb10d238c8.matter | 4 +- .../rootnode_laundrywasher_fb10d238c8.zap | 8 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 4 +- .../rootnode_lightsensor_lZQycTFcJK.zap | 8 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 4 +- .../rootnode_occupancysensor_iHyVgifZuo.zap | 8 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 4 +- .../rootnode_onofflight_bbs1b7IaOV.zap | 8 +- .../rootnode_onofflight_samplemei.matter | 4 +- .../devices/rootnode_onofflight_samplemei.zap | 8 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 4 +- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 8 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 4 +- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 8 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 4 +- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 8 +- .../devices/rootnode_pump_5f904818cc.matter | 4 +- .../chef/devices/rootnode_pump_5f904818cc.zap | 8 +- .../devices/rootnode_pump_a811bb33a0.matter | 4 +- .../chef/devices/rootnode_pump_a811bb33a0.zap | 8 +- ...eraturecontrolledcabinet_ffdb696680.matter | 8 +- ...emperaturecontrolledcabinet_ffdb696680.zap | 16 +- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 4 +- ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 8 +- ...tnode_roomairconditioner_9cf3607804.matter | 4 +- ...rootnode_roomairconditioner_9cf3607804.zap | 8 +- .../rootnode_smokecoalarm_686fe0dcb8.matter | 4 +- .../rootnode_smokecoalarm_686fe0dcb8.zap | 8 +- .../rootnode_speaker_RpzeXdimqA.matter | 4 +- .../devices/rootnode_speaker_RpzeXdimqA.zap | 8 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 4 +- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 8 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 4 +- .../rootnode_thermostat_bm3fb8dhYi.zap | 8 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 4 +- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 8 +- examples/chef/devices/template.zap | 10 +- .../contact-sensor-app.matter | 4 +- .../contact-sensor-app.zap | 8 +- .../dishwasher-common/dishwasher-app.matter | 4 +- .../dishwasher-common/dishwasher-app.zap | 8 +- .../energy-management-app.matter | 4 +- .../energy-management-app.zap | 36 +- .../light-switch-app.matter | 6 +- .../light-switch-common/light-switch-app.zap | 12 +- .../light-switch-app/qpg/zap/switch.matter | 6 +- examples/light-switch-app/qpg/zap/switch.zap | 409 ++-- .../data_model/lighting-app-ethernet.matter | 2 +- .../data_model/lighting-app-ethernet.zap | 4 +- .../data_model/lighting-app-thread.matter | 4 +- .../data_model/lighting-app-thread.zap | 8 +- .../data_model/lighting-app-wifi.matter | 4 +- .../data_model/lighting-app-wifi.zap | 8 +- .../lighting-common/lighting-app.matter | 4 +- .../lighting-common/lighting-app.zap | 696 +++---- .../nxp/zap/lighting-on-off.matter | 4 +- .../lighting-app/nxp/zap/lighting-on-off.zap | 8 +- examples/lighting-app/qpg/zap/light.matter | 4 +- examples/lighting-app/qpg/zap/light.zap | 10 +- .../data_model/lighting-thread-app.matter | 4 +- .../silabs/data_model/lighting-thread-app.zap | 776 ++++--- .../data_model/lighting-wifi-app.matter | 4 +- .../silabs/data_model/lighting-wifi-app.zap | 782 +++---- .../lit-icd-common/lit-icd-server-app.matter | 2 +- .../lit-icd-common/lit-icd-server-app.zap | 13 +- examples/lock-app/lock-common/lock-app.matter | 4 +- examples/lock-app/lock-common/lock-app.zap | 8 +- examples/lock-app/nxp/zap/lock-app.matter | 4 +- examples/lock-app/nxp/zap/lock-app.zap | 8 +- examples/lock-app/qpg/zap/lock.matter | 4 +- examples/lock-app/qpg/zap/lock.zap | 8 +- .../microwave-oven-app.matter | 4 +- .../microwave-oven-app.zap | 8 +- .../network-manager-app.matter | 4 +- .../network-manager-app.zap | 8 +- .../ota-provider-app.matter | 2 +- .../ota-provider-common/ota-provider-app.zap | 4 +- .../ota-requestor-app.matter | 6 +- .../ota-requestor-app.zap | 12 +- .../placeholder/linux/apps/app1/config.matter | 4 +- .../placeholder/linux/apps/app1/config.zap | 468 ++--- .../placeholder/linux/apps/app2/config.matter | 4 +- .../placeholder/linux/apps/app2/config.zap | 436 ++-- examples/pump-app/pump-common/pump-app.matter | 4 +- examples/pump-app/pump-common/pump-app.zap | 8 +- .../silabs/data_model/pump-thread-app.matter | 4 +- .../silabs/data_model/pump-thread-app.zap | 8 +- .../silabs/data_model/pump-wifi-app.matter | 4 +- .../silabs/data_model/pump-wifi-app.zap | 8 +- .../pump-controller-app.matter | 4 +- .../pump-controller-app.zap | 8 +- .../refrigerator-app.matter | 8 +- .../refrigerator-common/refrigerator-app.zap | 16 +- examples/rvc-app/rvc-common/rvc-app.matter | 4 +- examples/rvc-app/rvc-common/rvc-app.zap | 8 +- .../smoke-co-alarm-app.matter | 4 +- .../smoke-co-alarm-app.zap | 8 +- .../temperature-measurement.matter | 4 +- .../temperature-measurement.zap | 8 +- .../nxp/zap/thermostat_matter_thread.matter | 4 +- .../nxp/zap/thermostat_matter_thread.zap | 372 ++-- .../nxp/zap/thermostat_matter_wifi.matter | 4 +- .../nxp/zap/thermostat_matter_wifi.zap | 372 ++-- .../qpg/zap/thermostaticRadiatorValve.matter | 4 +- .../qpg/zap/thermostaticRadiatorValve.zap | 8 +- .../thermostat-common/thermostat.matter | 4 +- .../thermostat-common/thermostat.zap | 8 +- examples/tv-app/tv-common/tv-app.matter | 8 +- examples/tv-app/tv-common/tv-app.zap | 16 +- .../tv-casting-common/tv-casting-app.matter | 4 +- .../tv-casting-common/tv-casting-app.zap | 12 +- .../virtual-device-app.matter | 4 +- .../virtual-device-app.zap | 500 ++--- examples/window-app/common/window-app.matter | 6 +- examples/window-app/common/window-app.zap | 12 +- .../zap/tests/inputs/all-clusters-app.zap | 1228 ++++++----- .../tools/zap/tests/inputs/lighting-app.zap | 8 +- .../app-templates/endpoint_config.h | 54 +- .../app-templates/endpoint_config.h | 28 +- .../zcl/zcl-with-test-extensions.json | 2 +- src/app/zap-templates/zcl/zcl.json | 2 +- .../data_model/controller-clusters.zap | 7 +- .../zap-generated/attributes/Accessors.cpp | 35 +- .../zap-generated/attributes/Accessors.h | 9 +- 168 files changed, 5081 insertions(+), 5244 deletions(-) diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index d6f5e88f0f3407..33de78383c41fc 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -1901,7 +1901,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2105,7 +2105,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2192,7 +2192,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2433,7 +2433,7 @@ endpoint 3 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2477,7 +2477,7 @@ endpoint 4 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap index 9e6fd096b39361..d71c47a6d98758 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2445,10 +2445,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3525,10 +3525,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6822,10 +6822,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7347,10 +7347,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index e1c3018f693dfa..93807b60380b51 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -1992,7 +1992,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2309,7 +2309,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index 52d2ddfccc18f1..06db369cc4e3b6 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4048,10 +4048,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 91d26e041ad7a0..270e2ecc9e6cda 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -7063,7 +7063,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -7644,7 +7644,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -8915,7 +8915,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -8984,7 +8984,7 @@ endpoint 65534 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 12de6efc7065fe..438aef17a0516e 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -459,10 +459,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2744,7 +2744,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2760,7 +2760,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2776,7 +2776,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2792,7 +2792,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6584,155 +6584,166 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", + "define": "ON_OFF_CLUSTER", + "side": "client", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "RemoveAllScenes", - "code": 3, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveAllScenesResponse", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ { - "name": "StoreScene", - "code": 4, + "name": "Off", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "On", + "code": 1, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "Toggle", + "code": 2, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembershipResponse", - "code": 6, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 }, { - "name": "CopyScene", - "code": 64, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "CopySceneResponse", - "code": 64, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 } ], "attributes": [ { - "name": "LastConfiguredBy", + "name": "OnOff", "code": 0, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", "type": "int16u", @@ -6740,26 +6751,42 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 2, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "StartUpOnOffEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6836,10 +6863,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0001", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6852,7 +6879,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6861,333 +6888,29 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", "enabled": 1, - "commands": [ + "apiMaturity": "deprecated", + "attributes": [ { - "name": "Off", + "name": "switch type", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithTimedOff", - "code": 66, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GlobalSceneControl", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OnTime", - "code": 16385, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OffWaitTime", - "code": 16386, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StartUpOnOff", - "code": 16387, - "mfgCode": null, - "side": "server", - "type": "StartUpOnOffEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "switch type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { "name": "switch actions", @@ -7821,10 +7544,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11241,8 +10964,236 @@ "isEnabled": 1 }, { - "name": "Start", - "code": 2, + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Pause", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -11263,6 +11214,14 @@ "source": "server", "isIncoming": 0, "isEnabled": 1 + }, + { + "name": "GoHome", + "code": 128, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -11335,7 +11294,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "OperationalStateEnum", + "type": "enum8", "included": 1, "storageOption": "External", "singleton": 0, @@ -11461,15 +11420,16 @@ ] }, { - "name": "RVC Operational State", - "code": 97, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "Pause", + "name": "AddScene", "code": 0, "mfgCode": null, "source": "client", @@ -11477,7 +11437,47 @@ "isEnabled": 1 }, { - "name": "Resume", + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", "code": 3, "mfgCode": null, "source": "client", @@ -11485,7 +11485,23 @@ "isEnabled": 1 }, { - "name": "OperationalCommandResponse", + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", "code": 4, "mfgCode": null, "source": "server", @@ -11493,68 +11509,84 @@ "isEnabled": 1 }, { - "name": "GoHome", - "code": 128, + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CopySceneResponse", + "code": 64, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ { - "name": "PhaseList", + "name": "LastConfiguredBy", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "node_id", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentPhase", + "name": "SceneTableSize", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "16", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CountdownTime", + "name": "FabricSceneInfo", "code": 2, "mfgCode": null, "side": "server", - "type": "elapsed_s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OperationalStateList", - "code": 3, - "mfgCode": null, - "side": "server", "type": "array", "included": 1, "storageOption": "External", @@ -11567,27 +11599,11 @@ "reportableChange": 0 }, { - "name": "OperationalState", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OperationalError", - "code": 5, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "ErrorStateStruct", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -11599,8 +11615,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -11615,8 +11631,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -11656,7 +11672,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11674,26 +11690,10 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "OperationalError", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "OperationCompletion", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { @@ -13122,7 +13122,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13830,7 +13830,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13846,7 +13846,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13862,7 +13862,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13878,7 +13878,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13894,7 +13894,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13910,7 +13910,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13926,7 +13926,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13987,7 +13987,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14003,7 +14003,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14019,7 +14019,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14035,7 +14035,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14051,7 +14051,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14067,7 +14067,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14083,7 +14083,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22525,48 +22525,48 @@ "reportableChange": 0 }, { - "name": "MeiInt8u", - "code": 4294070017, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "mei_int8u", + "code": 4294070017, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22872,305 +22872,28 @@ }, { "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "NameSupportBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CopyScene", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "CopySceneResponse", - "code": 64, + "code": 5, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 } ], "attributes": [ { - "name": "LastConfiguredBy", + "name": "NameSupport", "code": 0, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -23247,7 +22970,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23263,7 +22986,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23516,72 +23239,290 @@ "enabled": 1, "attributes": [ { - "name": "DeviceTypeList", - "code": 0, + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "B3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "BatChargeLevel", + "code": 14, "mfgCode": null, "side": "server", - "type": "array", + "type": "BatChargeLevelEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "BatReplacementNeeded", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "BatReplaceability", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "BatReplaceabilityEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TagList", - "code": 4, + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", "type": "array", @@ -23669,7 +23610,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23682,10 +23623,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23694,83 +23635,142 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "apiMaturity": "provisional", + "commands": [ { - "name": "Status", + "name": "AddScene", "code": 0, "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "Order", + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", "code": 1, "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "Description", + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", "code": 2, "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "B3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "RemoveSceneResponse", + "code": 2, "mfgCode": null, - "side": "server", - "type": "BatChargeLevelEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "BatReplacementNeeded", - "code": 15, + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CopySceneResponse", + "code": 64, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LastConfiguredBy", + "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "node_id", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -23782,24 +23782,24 @@ "reportableChange": 0 }, { - "name": "BatReplaceability", - "code": 16, + "name": "SceneTableSize", + "code": 1, "mfgCode": null, "side": "server", - "type": "BatReplaceabilityEnum", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "16", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "FabricSceneInfo", + "code": 2, "mfgCode": null, "side": "server", "type": "array", @@ -23887,7 +23887,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23903,10 +23903,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -24173,10 +24173,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -24541,4 +24541,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index fa161d6009bf01..6ce04bbb170469 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -5898,7 +5898,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -6304,7 +6304,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -6851,7 +6851,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -6915,7 +6915,7 @@ endpoint 65534 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index f81e261efc295c..2f7a83ee7362de 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -435,10 +435,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4599,16 +4599,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -4616,15 +4615,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -4632,15 +4623,7 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", @@ -4648,90 +4631,82 @@ "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "GetSceneMembership", - "code": 6, + "name": "OnOff", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { - "name": "LastConfiguredBy", - "code": 0, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -4739,26 +4714,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 2, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -4835,10 +4810,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -4851,7 +4826,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4860,15 +4835,15 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "Off", + "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", @@ -4876,7 +4851,7 @@ "isEnabled": 1 }, { - "name": "On", + "name": "Move", "code": 1, "mfgCode": null, "source": "client", @@ -4884,7 +4859,7 @@ "isEnabled": 1 }, { - "name": "Toggle", + "name": "Step", "code": 2, "mfgCode": null, "source": "client", @@ -4892,24 +4867,40 @@ "isEnabled": 1 }, { - "name": "OffWithEffect", - "code": 64, + "name": "Stop", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithRecallGlobalScene", - "code": 65, + "name": "MoveToLevelWithOnOff", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithTimedOff", - "code": 66, + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -4918,359 +4909,107 @@ ], "attributes": [ { - "name": "OnOff", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "RemainingTime", + "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "Options", + "code": 15, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "OnLevel", + "code": 17, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "StartUpCurrentLevel", + "code": 16384, "mfgCode": null, "side": "server", - "type": "StartUpOnOffEnum", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RemainingTime", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Options", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "OptionsBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OnLevel", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpCurrentLevel", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "255", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5426,10 +5165,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6300,7 +6039,268 @@ ] }, { - "name": "Door Lock", + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LastConfiguredBy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", "code": 257, "mfgCode": null, "define": "DOOR_LOCK_CLUSTER", @@ -10397,42 +10397,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "-100", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "write_only_int8u", - "code": 16426, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", + "defaultValue": "-100", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MeiInt8u", - "code": 4294070017, + "name": "write_only_int8u", + "code": 16426, "mfgCode": null, "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -10466,6 +10450,22 @@ "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 + }, + { + "name": "mei_int8u", + "code": 4294070017, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 } ], "events": [ @@ -10890,16 +10890,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -10907,15 +10906,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -10923,15 +10914,7 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", @@ -10939,90 +10922,82 @@ "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "GetSceneMembership", - "code": 6, + "name": "OnOff", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { - "name": "LastConfiguredBy", - "code": 0, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -11030,26 +11005,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 2, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -11126,10 +11101,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -11142,7 +11117,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -11151,141 +11126,75 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithTimedOff", - "code": 66, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], "attributes": [ { - "name": "OnOff", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GlobalSceneControl", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "ServerList", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "StartUpOnOffEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -11359,13 +11268,13 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -11375,76 +11284,76 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Descriptor", - "code": 29, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "POWER_SOURCE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "DeviceTypeList", + "name": "Status", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "PowerSourceStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ServerList", + "name": "Order", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClientList", + "name": "Description", "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "B3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", "type": "array", @@ -11545,10 +11454,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11557,64 +11466,155 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "apiMaturity": "provisional", + "commands": [ { - "name": "Status", + "name": "AddScene", "code": 0, "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "Order", + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", "code": 1, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LastConfiguredBy", + "code": 0, + "mfgCode": null, "side": "server", - "type": "int8u", + "type": "node_id", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Description", - "code": 2, + "name": "SceneTableSize", + "code": 1, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "B3", + "defaultValue": "16", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "FabricSceneInfo", + "code": 2, "mfgCode": null, "side": "server", "type": "array", @@ -11702,7 +11702,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11718,10 +11718,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -11988,10 +11988,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12356,4 +12356,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index aef4649df2ce39..55712fe444589c 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1902,7 +1902,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2265,7 +2265,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2330,7 +2330,7 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 0412a216ba7872..78c1e1b8d6fdaf 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4723,10 +4723,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5473,10 +5473,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 63ead45d7bb823..bb412cca740ea1 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1643,7 +1643,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2026,7 +2026,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 44e06c856968f8..9c33313413f340 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4698,10 +4698,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index 3c5269f5edf490..d26348310ca696 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -1325,7 +1325,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1545,7 +1545,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap index 5ca6fd92d71bd1..d207dd10082700 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2611,10 +2611,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index df276f6ab3fce3..a06d523bd40cf3 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -2194,7 +2194,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2406,7 +2406,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2483,7 +2483,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2714,7 +2714,7 @@ endpoint 3 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2757,7 +2757,7 @@ endpoint 4 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2800,7 +2800,7 @@ endpoint 5 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 0d630cb43d894e..fbfaa57a7df141 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2450,10 +2450,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3436,10 +3436,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6573,10 +6573,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7082,10 +7082,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7591,10 +7591,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 90005fa99cd6f0..ebfb6e54b28213 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -1834,7 +1834,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2067,7 +2067,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap index ce907b4d22843f..11e9fc1295ecdc 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2743,10 +2743,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 56d1fc88e7b9f4..d4c01f16b5ef25 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1859,7 +1859,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2096,7 +2096,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 272db06ab28ad4..245f7ee38016e5 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2783,10 +2783,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index af5819a6623250..dfb0d2c30da30f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1716,7 +1716,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1992,7 +1992,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 709b2d3d338aba..780705f02b4bb0 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3181,10 +3181,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index a1b2409676b40f..2fe383530fea5c 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -1417,7 +1417,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1636,7 +1636,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index c81df7d7482f9e..cbbcbea13c6d81 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2587,10 +2587,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index cfb648787c6b84..65e16fc68d08b4 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1317,7 +1317,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1572,7 +1572,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 7b5a4b49f9810a..f92b4a2b8807aa 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2939,10 +2939,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 541f0e2afafd61..76e54a5ccdc84a 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1538,7 +1538,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1837,7 +1837,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 6ccf72e82c653b..aa943a62f9afcd 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3435,10 +3435,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 75fc5f1af0cb09..2803433e108d20 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -1126,7 +1126,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1383,7 +1383,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap index 5bc8fb68715b8c..112a3c7b048ec9 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3276,10 +3276,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 646f2cc00279fa..99b8356ecdf6aa 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1951,7 +1951,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2206,7 +2206,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 96c60ff5453cd3..8980e074c1ef44 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2939,10 +2939,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 906cd474afa5d2..062f3d8421a83c 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1817,7 +1817,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2113,7 +2113,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index edd39619401e94..fb126a3c790f37 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3403,10 +3403,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index fc2c4c62b0d179..af697266d1b2f6 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1361,7 +1361,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1617,7 +1617,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index f3b01c60689739..b1651dcca50bb8 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2963,10 +2963,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 1a35e053e79660..798bbaf3c50af3 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1316,7 +1316,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1552,7 +1552,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 5fe9927c1a14ea..10e66cda8d94e5 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2793,10 +2793,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 9a519df48b380f..d343385b18d5da 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -985,7 +985,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1176,7 +1176,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap index d4f54512a7f13e..a9eded89acddec 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2246,10 +2246,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index ed16842ca4a281..bf73232fd78f06 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1950,7 +1950,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2241,7 +2241,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 139e739d9f8411..64d8592a83382c 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3307,10 +3307,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 13d17eb37417ea..6453623a943ebe 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1316,7 +1316,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1552,7 +1552,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index d93a61ea027e91..e9e134d3f90508 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2793,10 +2793,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 51af151b59bbcf..372b79a19f8c6a 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -1126,7 +1126,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1370,7 +1370,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index 6b3b2859bc5f03..f1e98479de205e 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3136,10 +3136,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index e02f49d22e9596..71923d22279635 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1322,7 +1322,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1558,7 +1558,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index c01e3ca021db05..dd2cd67a75b559 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2777,10 +2777,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index e0c1190683fd55..73e4c3ce1d1bee 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1341,7 +1341,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1577,7 +1577,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 550bd5b467de59..e9281aa459e8fb 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2793,10 +2793,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 3e0677c042fcba..098de3b8bc0c04 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1497,7 +1497,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1793,7 +1793,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index e39bd754aadf0c..c7a98b1ec03e3a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3403,10 +3403,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index a5ab25e98ee287..792908dc70e8a1 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -1529,7 +1529,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1825,7 +1825,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index 5ebbfde48fba36..d1b34e47130692 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3403,10 +3403,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index fbcda1f0781584..aa6867dc6dd7b5 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1444,7 +1444,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1713,7 +1713,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 4172207e164fe8..fa6cd7601142ad 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3123,10 +3123,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 11e2818981123a..a1ef7be5a8875b 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1372,7 +1372,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1644,7 +1644,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 7dcde4698b9da4..a272c5251974ad 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3135,10 +3135,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 29ecb770963c79..6a64f874178e92 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1343,7 +1343,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1585,7 +1585,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index d8a968333633c6..22e60458826a92 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2835,10 +2835,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index eff24b568e8e1f..2d0689d5f25371 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -1226,7 +1226,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1453,7 +1453,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.zap b/examples/chef/devices/rootnode_pump_5f904818cc.zap index b8909b097aaaa0..bf3d6a21b1ab87 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.zap +++ b/examples/chef/devices/rootnode_pump_5f904818cc.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2788,10 +2788,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 3cb93176336f27..4c2184dff0c73e 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1169,7 +1169,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1396,7 +1396,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index e41fb9daa1c1aa..8b6e21c9b5b383 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2788,10 +2788,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 4ed7903266400a..aa021d9050990d 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -1092,7 +1092,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1336,7 +1336,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } @@ -1352,7 +1352,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1380,7 +1380,7 @@ endpoint 3 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index 7aa39d37307947..56bc27665c5951 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3136,10 +3136,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3319,10 +3319,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3634,10 +3634,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index fa836fe8b0c5e2..58e7d6e04bb19d 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1191,7 +1191,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1403,7 +1403,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 126e811df06356..28300ead917487 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2450,10 +2450,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 6797456a6b6091..c41e4fcc03b29b 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1566,7 +1566,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1791,7 +1791,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index 3c1f4e2a352817..d2b7880a6f3246 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2582,10 +2582,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 6328708dc1f816..af7c3a340cf24d 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -1378,7 +1378,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1590,7 +1590,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap index 5659783ce4ece8..02a1ca850eafb1 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2442,10 +2442,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index d5e42a22c43f66..2862703d045d1d 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1420,7 +1420,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1690,7 +1690,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index b6cd32c5f5895d..3601b64d819002 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3119,10 +3119,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index c45114f20de705..6993a6fa5e9a6f 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1316,7 +1316,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1552,7 +1552,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index b35d366285e564..9213df7635a717 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2793,10 +2793,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 30163a05f14a9a..4ab01b329d34aa 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1860,7 +1860,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2119,7 +2119,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 1fc6cb94ba9606..3d25fcb70f94f3 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2939,10 +2939,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 3cb70eea484491..20fa873418127e 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1453,7 +1453,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1708,7 +1708,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index b91dfc2b141d36..caf75a60da9de9 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2939,10 +2939,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 6a1395f2eafb3f..7a486e09066efc 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2418,10 +2418,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2725,4 +2725,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 6023f53fa18bba..4372e568a2927d 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1657,7 +1657,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2007,7 +2007,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index c6b0021764b0a4..19b43af9e8140a 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4496,10 +4496,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 6a2620e02878fa..3359107957e727 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1241,7 +1241,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1514,7 +1514,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index 09ad0865018b8c..83e189441e4a2d 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -419,10 +419,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3548,10 +3548,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index d779ebbebdd1ba..2c580b5d463276 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -1402,7 +1402,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1594,7 +1594,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap index c23f65bffa1297..78485dfabbd55d 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.zap +++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap @@ -203,10 +203,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2490,10 +2490,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3470,7 +3470,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3486,7 +3486,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3502,7 +3502,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3518,7 +3518,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3534,7 +3534,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3550,7 +3550,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3566,7 +3566,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3627,7 +3627,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3643,7 +3643,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3659,7 +3659,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3675,7 +3675,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3691,7 +3691,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3707,7 +3707,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3723,7 +3723,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 334bfb3051ec8b..2a5819e69cf915 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2482,7 +2482,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2895,7 +2895,7 @@ endpoint 1 { callback attribute clientList; callback attribute partsList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2930,7 +2930,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 43b138430d6eb9..58f5c72eb4578a 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5027,10 +5027,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5697,10 +5697,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index fd531690030d37..035913b5487922 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -2283,7 +2283,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2663,7 +2663,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2704,7 +2704,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap index b4e956bc78fda3..c38a138daeb2a5 100644 --- a/examples/light-switch-app/qpg/zap/switch.zap +++ b/examples/light-switch-app/qpg/zap/switch.zap @@ -203,10 +203,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -626,7 +626,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -642,7 +642,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -658,7 +658,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -674,7 +674,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -690,7 +690,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -722,7 +722,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1009,7 +1009,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1920,7 +1920,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1936,7 +1936,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1952,7 +1952,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1968,7 +1968,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2146,7 +2146,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2162,7 +2162,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2178,7 +2178,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2194,7 +2194,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2422,7 +2422,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2550,7 +2550,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2566,7 +2566,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2582,7 +2582,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2598,7 +2598,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2614,7 +2614,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2630,7 +2630,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2646,7 +2646,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2662,7 +2662,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2678,7 +2678,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2694,7 +2694,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2710,7 +2710,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2726,7 +2726,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2742,7 +2742,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2758,7 +2758,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2774,7 +2774,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2790,7 +2790,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2806,7 +2806,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2822,7 +2822,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2838,7 +2838,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2854,7 +2854,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2870,7 +2870,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2886,7 +2886,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2902,7 +2902,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2918,7 +2918,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2934,7 +2934,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2950,7 +2950,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2966,7 +2966,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2982,7 +2982,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2998,7 +2998,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3014,7 +3014,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3030,7 +3030,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3046,7 +3046,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3062,7 +3062,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3078,7 +3078,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3094,7 +3094,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3110,7 +3110,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3126,7 +3126,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3142,7 +3142,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3158,7 +3158,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3174,7 +3174,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3190,7 +3190,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3206,7 +3206,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4608,15 +4608,6 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "OnTransitionToActiveMode", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] } ] @@ -4983,140 +4974,8 @@ "defaultValue": "4", "reportable": 1, "minInterval": 1, - "maxInterval": 65534 - } - ] - }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "maxInterval": 65534, + "reportableChange": null } ] }, @@ -5383,10 +5242,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5532,6 +5391,139 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, @@ -5912,10 +5904,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6102,6 +6094,5 @@ "endpointId": 2, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 8a539d61c51aba..ad6f111938127d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -2162,7 +2162,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap index 8e9a98042f426b..d8848ce3f5234d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap @@ -3460,10 +3460,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index b84d9b2b2774f3..78048d0b457bbf 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1980,7 +1980,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2348,7 +2348,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index f9491931a681af..1a410c2d751a7c 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4436,10 +4436,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index e5dc83b4a1a781..5b77ecb961222f 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1891,7 +1891,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2211,7 +2211,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 31780199b9dace..94a906a3f532a5 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3643,10 +3643,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 3f04f24e105034..f8996d1353ca8a 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2344,7 +2344,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2761,7 +2761,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 45cd774e000978..870f5f430d7704 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4426,121 +4426,56 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", + "name": "Off", "code": 0, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ViewSceneResponse", + "name": "On", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveSceneResponse", + "name": "Toggle", "code": 2, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CopyScene", - "code": 64, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -4549,99 +4484,83 @@ ], "attributes": [ { - "name": "LastConfiguredBy", + "name": "OnOff", "code": 0, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, + "defaultValue": "0x01", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -4670,7 +4589,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4679,15 +4598,15 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "Off", + "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", @@ -4695,7 +4614,7 @@ "isEnabled": 1 }, { - "name": "On", + "name": "Move", "code": 1, "mfgCode": null, "source": "client", @@ -4703,7 +4622,7 @@ "isEnabled": 1 }, { - "name": "Toggle", + "name": "Step", "code": 2, "mfgCode": null, "source": "client", @@ -4711,24 +4630,40 @@ "isEnabled": 1 }, { - "name": "OffWithEffect", - "code": 64, + "name": "Stop", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithRecallGlobalScene", - "code": 65, + "name": "MoveToLevelWithOnOff", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithTimedOff", - "code": 66, + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -4737,104 +4672,88 @@ ], "attributes": [ { - "name": "OnOff", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "RemainingTime", + "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "MinLevel", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "MaxLevel", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0xFE", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, - "mfgCode": null, - "side": "server", - "type": "StartUpOnOffEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "MinFrequency", + "code": 5, "mfgCode": null, "side": "server", "type": "int16u", @@ -4842,139 +4761,63 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 }, { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepWithOnOff", + "name": "MaxFrequency", "code": 6, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RemainingTime", - "code": 1, + "name": "Options", + "code": 15, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MinLevel", - "code": 2, + "name": "OnOffTransitionTime", + "code": 16, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxLevel", - "code": 3, + "name": "OnLevel", + "code": 17, "mfgCode": null, "side": "server", "type": "int8u", @@ -4982,15 +4825,15 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", + "defaultValue": "0xFF", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFrequency", - "code": 4, + "name": "OnTransitionTime", + "code": 18, "mfgCode": null, "side": "server", "type": "int16u", @@ -4998,15 +4841,15 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinFrequency", - "code": 5, + "name": "OffTransitionTime", + "code": 19, "mfgCode": null, "side": "server", "type": "int16u", @@ -5014,138 +4857,148 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxFrequency", - "code": 6, + "name": "DefaultMoveRate", + "code": 20, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "50", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Options", - "code": 15, + "name": "StartUpCurrentLevel", + "code": 16384, "mfgCode": null, "side": "server", - "type": "OptionsBitmap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnOffTransitionTime", - "code": 16, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnLevel", - "code": 17, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "OnTransitionTime", - "code": 18, + "name": "DeviceTypeList", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffTransitionTime", - "code": 19, + "name": "ServerList", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DefaultMoveRate", - "code": 20, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "50", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpCurrentLevel", - "code": 16384, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "255", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -5155,10 +5008,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5171,30 +5024,177 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Descriptor", - "code": 29, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { - "name": "DeviceTypeList", + "name": "LastConfiguredBy", "code": 0, "mfgCode": null, "side": "server", + "type": "node_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", "type": "array", "included": 1, "storageOption": "External", @@ -5207,8 +5207,8 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -5223,8 +5223,8 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -5239,8 +5239,8 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -5264,7 +5264,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5277,13 +5277,13 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -5929,4 +5929,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 7886980bc9f6c1..048b8f4748d326 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1515,7 +1515,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1838,7 +1838,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 5be21734eee409..e7f1d48c378d29 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3949,10 +3949,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 231379b7dcecc8..bef48495ad23e8 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1922,7 +1922,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2322,7 +2322,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 32c773385f5b54..c328c070b45a68 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5066,10 +5066,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5980,4 +5980,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 316f09edb7fa30..86db7ac353c727 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2388,7 +2388,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2773,7 +2773,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 1bf2408f188a46..55b06213c5794b 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3974,16 +3974,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -3991,15 +3990,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -4007,15 +3998,7 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", @@ -4023,98 +4006,82 @@ "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "GetSceneMembership", - "code": 6, + "name": "OnOff", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CopySceneResponse", - "code": 60, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "LastConfiguredBy", - "code": 0, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -4122,26 +4089,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 2, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -4234,7 +4201,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4243,15 +4210,15 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "Off", + "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", @@ -4259,7 +4226,7 @@ "isEnabled": 1 }, { - "name": "On", + "name": "Move", "code": 1, "mfgCode": null, "source": "client", @@ -4267,7 +4234,7 @@ "isEnabled": 1 }, { - "name": "Toggle", + "name": "Step", "code": 2, "mfgCode": null, "source": "client", @@ -4275,24 +4242,40 @@ "isEnabled": 1 }, { - "name": "OffWithEffect", - "code": 64, + "name": "Stop", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithRecallGlobalScene", - "code": 65, + "name": "MoveToLevelWithOnOff", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithTimedOff", - "code": 66, + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -4301,345 +4284,93 @@ ], "attributes": [ { - "name": "OnOff", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "RemainingTime", + "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "MinLevel", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "MaxLevel", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0xFE", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "CurrentFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "StartUpOnOffEnum", + "type": "int16u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "MinFrequency", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RemainingTime", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MinLevel", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxLevel", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentFrequency", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinFrequency", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -5017,10 +4748,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5326,6 +5057,267 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LastConfiguredBy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, @@ -5877,4 +5869,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index ec8a065b9f5abd..b52944de7a3f8c 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2299,7 +2299,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2633,7 +2633,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 2d9a0039f65f25..3cf074afc1b0b6 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3158,16 +3158,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -3175,15 +3174,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -3191,15 +3182,7 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", @@ -3207,98 +3190,82 @@ "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "GetSceneMembership", - "code": 6, + "name": "OnOff", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CopyScene", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "LastConfiguredBy", - "code": 0, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 1, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -3306,26 +3273,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 2, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -3418,7 +3385,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3427,15 +3394,15 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "Off", + "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", @@ -3443,7 +3410,7 @@ "isEnabled": 1 }, { - "name": "On", + "name": "Move", "code": 1, "mfgCode": null, "source": "client", @@ -3451,7 +3418,7 @@ "isEnabled": 1 }, { - "name": "Toggle", + "name": "Step", "code": 2, "mfgCode": null, "source": "client", @@ -3459,24 +3426,40 @@ "isEnabled": 1 }, { - "name": "OffWithEffect", - "code": 64, + "name": "Stop", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithRecallGlobalScene", - "code": 65, + "name": "MoveToLevelWithOnOff", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithTimedOff", - "code": 66, + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -3485,343 +3468,91 @@ ], "attributes": [ { - "name": "OnOff", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "RemainingTime", + "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "MinLevel", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "MaxLevel", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0xFE", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "CurrentFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "StartUpOnOffEnum", + "type": "int16u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "MinFrequency", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RemainingTime", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MinLevel", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxLevel", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentFrequency", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinFrequency", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int16u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4201,10 +3932,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4510,6 +4241,275 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LastConfiguredBy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, @@ -5061,4 +5061,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 93ea6fb5dfc07c..17d36e26ceeff5 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -1485,7 +1485,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index 14f5e80526c979..d288636d7ea5e6 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -295,10 +295,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3615,15 +3615,6 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "OnTransitionToActiveMode", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] } ] diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 65d89f0ff8f6d7..6a3aad2cf8e382 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2487,7 +2487,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2902,7 +2902,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index ef58c8006cb198..c5201e7a6fbb0c 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -211,10 +211,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5358,10 +5358,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index ea056faf9147ea..add41c8ba65225 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1737,7 +1737,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1982,7 +1982,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index bdb78c5307b26c..e6683cf3147e1b 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3066,10 +3066,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 286ca4d4cb4f7d..e5546521e7343b 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -2141,7 +2141,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2509,7 +2509,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index d0489afe5c9b4b..f2bbe61b05b876 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4732,10 +4732,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index 70d2b496e213fa..eada9b169c8f8b 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -1151,7 +1151,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1391,7 +1391,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap index a74585718bb424..f82d87620b104c 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2988,10 +2988,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 1e754d83f02d35..fdc906d0ad60b9 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -1181,7 +1181,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1421,7 +1421,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap index 638a5ff605f36e..0ba225536e56e5 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.zap +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3182,10 +3182,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 2bb839cefd3d0c..9f8d7049b5b172 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -1086,7 +1086,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 23becbb30ac9ed..dd859506a8d391 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 6b0a43538b4b8e..aa72684ff1f68a 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -1285,7 +1285,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1539,7 +1539,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } @@ -1556,7 +1556,7 @@ endpoint 65534 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 37fb1e55071267..e2866c1995299d 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2913,10 +2913,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3112,10 +3112,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 4498e3bcd4ad8b..935a665fcde9f5 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -8170,7 +8170,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -9065,7 +9065,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index c6e7a42156eeff..79c6b06618944f 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -211,10 +211,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11794,235 +11794,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "On/Off", "code": 6, @@ -12950,10 +12721,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13665,6 +13436,235 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, @@ -15126,4 +15126,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 64a2bd3ddf598c..83657fd83849d5 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -8127,7 +8127,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -9025,7 +9025,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 25a662e1d91f23..87f25fcac3ef37 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -211,10 +211,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11876,235 +11876,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "On/Off", "code": 6, @@ -13000,10 +12771,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13457,6 +13228,203 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, @@ -14918,4 +14886,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index acd97c8d5bb068..b944766326f35d 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1647,7 +1647,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1923,7 +1923,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 47060615ba022a..c98805b742ab37 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3461,10 +3461,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 78f0e88073df49..43dcac8a086ab7 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1647,7 +1647,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1923,7 +1923,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 1759c693e901d0..43860bd6587f11 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3461,10 +3461,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 78f0e88073df49..43dcac8a086ab7 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1647,7 +1647,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1923,7 +1923,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index 1759c693e901d0..43860bd6587f11 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3461,10 +3461,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index efaad303eb0d5b..6995c3193c4322 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1481,7 +1481,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1726,7 +1726,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index c62ef5889939b5..e6599d06c9ec70 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3161,10 +3161,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index e5fc026d45b4fd..d8f04c28aaece7 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -1032,7 +1032,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1275,7 +1275,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } @@ -1292,7 +1292,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1321,7 +1321,7 @@ endpoint 3 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap index 2efab5f43b384c..4e53140434df25 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap @@ -187,10 +187,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3036,10 +3036,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3235,10 +3235,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3566,10 +3566,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 2579d7253054fb..4089d016fd603f 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1114,7 +1114,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1304,7 +1304,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index 8afe6df8ca4f33..d5c1431dded75b 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2238,10 +2238,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index f1c8ec9d14c736..7ca0706457f11b 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1919,7 +1919,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2260,7 +2260,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index e81864a5181d20..4cfe5ceb8ceca5 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4206,10 +4206,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 774e1ed2e8e5bd..4ee09b5869aaa4 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1331,7 +1331,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -1593,7 +1593,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index 9803e8d34ec36a..01453667d4538c 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3090,10 +3090,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index c343ec1a9c4c74..e554c32be1cfd3 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2264,7 +2264,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2563,7 +2563,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index d027da14fc9385..5099d34d8b6066 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -223,10 +223,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3769,187 +3769,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, @@ -4029,10 +3848,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4544,6 +4363,187 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Thermostat", "code": 513, @@ -4903,4 +4903,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 8976281af7435d..43b09015e9a461 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -2175,7 +2175,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2419,7 +2419,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index e8c5237ebdfa6c..c65331f86089a3 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -223,10 +223,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2911,187 +2911,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, @@ -3171,10 +2990,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3686,6 +3505,187 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Thermostat", "code": 513, @@ -4045,4 +4045,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 813c2a4759d408..713923440baa3a 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -1913,7 +1913,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2228,7 +2228,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap index f8208c351555c1..bd7e093e436a37 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap @@ -223,10 +223,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3935,10 +3935,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index fa9ac10945582d..309c686e0756cb 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2092,7 +2092,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2462,7 +2462,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 9f4432c9fee359..4909f50165ab55 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -207,10 +207,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4600,10 +4600,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 2cff19f2c3193d..bbbb06980e4eb3 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -3071,7 +3071,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -3429,7 +3429,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -3642,7 +3642,7 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } } @@ -3656,7 +3656,7 @@ endpoint 3 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 884246374269a9..955307dbf00c31 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4664,10 +4664,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6820,10 +6820,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6955,10 +6955,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index b1ee46b40cfb19..4238e6326e888b 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2529,7 +2529,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2819,7 +2819,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index a114c1ea6614d2..2bb394da30433d 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3240,10 +3240,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3394,10 +3394,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 471bd88fbd0e04..9e4c439744cf39 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -3001,7 +3001,7 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -3392,7 +3392,7 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index d3a9c539053487..67170dc9ed10da 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -139,10 +139,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4373,251 +4373,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "On/Off", "code": 6, @@ -4917,10 +4672,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5130,6 +4885,251 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SceneTableSize", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "16", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FabricSceneInfo", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Door Lock", "code": 257, @@ -6091,4 +6091,4 @@ "networkId": 0 } ] -} +} \ No newline at end of file diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index a3d14300047ad7..c8308305b71a9e 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1978,7 +1978,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2406,7 +2406,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } @@ -2492,7 +2492,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; callback attribute clusterRevision; } diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 58156ec9db2319..46ca5f520c42eb 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -211,10 +211,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5550,10 +5550,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6553,10 +6553,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 7e28b20523ec8d..1fbaef89d23d16 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -443,10 +443,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5973,16 +5973,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -5990,15 +5989,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -6006,15 +5997,7 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", @@ -6022,74 +6005,82 @@ "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenesResponse", - "code": 3, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreScene", - "code": 4, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "StoreSceneResponse", - "code": 4, + "name": "OnOff", + "code": 0, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "RecallScene", - "code": 5, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "OnTime", + "code": 16385, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 6, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -6097,26 +6088,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 7, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6193,10 +6184,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0001", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6209,7 +6200,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6218,301 +6209,65 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithTimedOff", - "code": 66, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], + "apiMaturity": "deprecated", "attributes": [ { - "name": "OnOff", + "name": "switch type", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "enum8", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "switch actions", + "code": 16, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StartUpOnOff", - "code": 16387, - "mfgCode": null, - "side": "server", - "type": "StartUpOnOffEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "switch type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "switch actions", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", @@ -7094,10 +6849,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7973,15 +7728,16 @@ ] }, { - "name": "Door Lock", - "code": 257, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "LockDoor", + "name": "AddScene", "code": 0, "mfgCode": null, "source": "client", @@ -7989,79 +7745,291 @@ "isEnabled": 1 }, { - "name": "UnlockDoor", - "code": 1, + "name": "AddSceneResponse", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "UnlockWithTimeout", - "code": 3, + "name": "ViewScene", + "code": 1, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "SetWeekDaySchedule", - "code": 11, + "name": "ViewSceneResponse", + "code": 1, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "GetWeekDaySchedule", - "code": 12, + "name": "RemoveScene", + "code": 2, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ClearWeekDaySchedule", - "code": 13, + "name": "RemoveSceneResponse", + "code": 2, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "SetYearDaySchedule", - "code": 14, + "name": "RemoveAllScenes", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetYearDaySchedule", - "code": 15, + "name": "RemoveAllScenesResponse", + "code": 3, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "SetUser", - "code": 26, + "name": "StoreScene", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetUser", - "code": 27, + "name": "StoreSceneResponse", + "code": 4, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "GetUserResponse", + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnlockWithTimeout", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetWeekDaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetWeekDaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ClearWeekDaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetYearDaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetYearDaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUserResponse", "code": 28, "mfgCode": null, "source": "server", @@ -15144,16 +15112,15 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -15161,15 +15128,7 @@ "isEnabled": 1 }, { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -15177,268 +15136,32 @@ "isEnabled": 1 }, { - "name": "ViewSceneResponse", - "code": 1, + "name": "Toggle", + "code": 2, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveScene", - "code": 2, + "name": "OffWithEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveSceneResponse", - "code": 2, + "name": "OnWithRecallGlobalScene", + "code": 65, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 }, { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SceneTableSize", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "OnWithTimedOff", - "code": 66, + "name": "OnWithTimedOff", + "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -15767,10 +15490,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -16012,6 +15735,219 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Occupancy Sensing", "code": 1030, @@ -16274,10 +16210,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 0a3f56f8d981bc..a696aec55f5a9a 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -279,10 +279,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5075,10 +5075,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 3d30ba408dd2f7..bf16ebb5941fa7 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -366,11 +366,11 @@ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ @@ -803,11 +803,11 @@ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ @@ -1420,11 +1420,11 @@ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Power Source (server) */ \ @@ -1450,11 +1450,11 @@ { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 65534, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ @@ -1993,7 +1993,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(7), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -2396,7 +2396,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(270), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -2929,7 +2929,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(687), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -2981,7 +2981,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(709), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -3011,8 +3011,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 345 }, { ZAP_CLUSTER_INDEX(27), 44, 3690 }, { ZAP_CLUSTER_INDEX(71), 7, 120 }, \ - { ZAP_CLUSTER_INDEX(78), 2, 4 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 341 }, { ZAP_CLUSTER_INDEX(27), 44, 3686 }, { ZAP_CLUSTER_INDEX(71), 7, 116 }, \ + { ZAP_CLUSTER_INDEX(78), 2, 0 }, \ } // Largest attribute size is needed for various buffers @@ -3024,7 +3024,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4159) +#define ATTRIBUTE_MAX_SIZE (4143) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index 2995578b503f1c..89b62b8659fd2c 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -88,11 +88,11 @@ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ @@ -480,11 +480,11 @@ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ @@ -782,7 +782,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(3), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -1107,7 +1107,7 @@ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(237), \ .attributeCount = 6, \ - .clusterSize = 4, \ + .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr, \ @@ -1150,7 +1150,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 239 }, { ZAP_CLUSTER_INDEX(22), 7, 109 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 235 }, { ZAP_CLUSTER_INDEX(22), 7, 105 }, \ } // Largest attribute size is needed for various buffers @@ -1162,7 +1162,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (348) +#define ATTRIBUTE_MAX_SIZE (340) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 70e59b08f29231..f45b05dd2c43e8 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -179,7 +179,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], - "Descriptor": ["ClusterRevision"], + "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ "ESAType", "ESACanGenerate", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index fa9f79f79147b0..dc9847b3427890 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -177,7 +177,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], - "Descriptor": ["ClusterRevision"], + "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ "ESAType", "ESACanGenerate", diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index c9de3724e3c4ff..727872d00da0a6 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -3265,7 +3265,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3326,7 +3326,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5622,6 +5622,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 5b38b98fb9d2ad..bf67f266e9635d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -1691,40 +1691,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace PulseWidthModulation namespace Descriptor { -namespace Attributes { - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Descriptor::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Descriptor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -} // namespace Attributes +namespace Attributes {} // namespace Attributes } // namespace Descriptor namespace Binding { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 35aea79a2bf140..8f343ba053a42f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -329,14 +329,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace PulseWidthModulation namespace Descriptor { -namespace Attributes { - -namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace FeatureMap - -} // namespace Attributes +namespace Attributes {} // namespace Attributes } // namespace Descriptor namespace Binding { From 6a35ffaac24ea928786d8afb2737d58b5c59937a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:08:37 +0100 Subject: [PATCH 45/45] Improved handling of SetAllEnabledAlarmsActive and ClearAllAlarms (#31649) --- .../boolean-state-configuration-server.cpp | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp index dd81c90cd00191..9ca68da511980d 100644 --- a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp +++ b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp @@ -274,8 +274,11 @@ CHIP_ERROR SetAllEnabledAlarmsActive(EndpointId ep) VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsEnabled::Get(ep, &alarmsEnabled), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsActive::Set(ep, alarmsEnabled), CHIP_IM_GLOBAL_STATUS(Failure)); - emitAlarmsStateChangedEvent(ep); + if (alarmsEnabled.HasAny()) + { + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsActive::Set(ep, alarmsEnabled), CHIP_IM_GLOBAL_STATUS(Failure)); + emitAlarmsStateChangedEvent(ep); + } return CHIP_NO_ERROR; } @@ -283,21 +286,34 @@ CHIP_ERROR SetAllEnabledAlarmsActive(EndpointId ep) CHIP_ERROR ClearAllAlarms(EndpointId ep) { BitMask alarmsActive, alarmsSuppressed; + bool emitEvent = false; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsActive::Get(ep, &alarmsActive), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsSuppressed::Get(ep, &alarmsSuppressed), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); - if (alarmsActive.HasAny() || alarmsSuppressed.HasAny()) + if (alarmsActive.HasAny()) { alarmsActive.ClearAll(); - alarmsSuppressed.ClearAll(); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsActive::Set(ep, alarmsActive), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); + emitEvent = true; + } + + if (alarmsSuppressed.HasAny()) + { + alarmsSuppressed.ClearAll(); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AlarmsSuppressed::Set(ep, alarmsSuppressed), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); + emitEvent = true; + } + + if (emitEvent) + { emitAlarmsStateChangedEvent(ep); } + return CHIP_NO_ERROR; }